Enum BrowseForFolderFlags

C

Chip Pearson

Stuart,

What version of Excel are you using? Enum types were added in
VBA6 (Excel 2000) and are not supported in previous versions.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
S

Stuart

I found the following code that hopefully should allow me to extract pixel
size from jpg files on my hard drive

http://groups.google.com/groups?q=Enum+BrowseForFolderFlags&hl=en&lr=&ie=UTF
-8&selm=eU9BCIDuAHA.1924%40tkmsftngp03&rnum=10

however i cannot get my module to accept the code, the problem seems to be
the first part that I quite frankly don't understand, any help would be much
appreciated!
***********************************************
Option Explicit

Enum BrowseForFolderFlags
BIF_RETURNONLYFSDIRS = &H1
BIF_DONTGOBELOWDOMAIN = &H2
BIF_STATUSTEXT = &H4
BIF_BROWSEFORCOMPUTER = &H1000
BIF_BROWSEFORPRINTER = &H2000
BIF_BROWSEINCLUDEFILES = &H4000
BIF_EDITBOX = &H10
BIF_RETURNFSANCESTORS = &H8
End Enum
*************************************************
Both lines that contain "Enum turn red and I am getting the error message..
"expected line number or label statement or end of statement"
 
C

Chip Pearson

Stuart,

Get rid of the Enum and End Enum statements, and change all the
elements to Long constants. E.g.,

Const BIF_RETURNONLYFSDIRS As Long = &H1

Don't declare any variable As BrowseForFolderFlags. Change the
declaration to As Long.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
S

Stuart

Top