Common dialog box and hard disk name on mac.

S

Sagiv Levi

Hi,
1) Is there a way to open a common dialog box (for file choosing ,
etc.) using the excel 2001 macro on the mac (OS 9.1) ?

2) Can I get the hard disk alias name from the macro, and if I can,
what is the command that get it ?

Thanks,
Sagiv
 
B

Bernard Rey

1) Is there a way to open a common dialog box (for file
choosing, etc.) using the excel 2001 macro on the mac
(OS 9.1) ?

Application.GetOpenFilename could be the answer. Note that
you can't have multiple selections on Mac OS. See the
Helpfile for details.
2) Can I get the hard disk alias name from the macro,
and if I can, what is the command that get it ?

toto = FileSystem.CurDir
tata = ActiveWorkbook.FullName
testA = Left(tata, InStr(tata, ":") - 1)
 
B

Bernard Rey

1) Is there a way to open a common dialog box (for file
choosing, etc.) using the excel 2001 macro on the mac
(OS 9.1) ?

Application.GetOpenFilename could be the answer. Note that
you can't have multiple selections on Mac OS. See the
Helpfile for details.
2) Can I get the hard disk alias name from the macro,
and if I can, what is the command that get it ?

toto = FileSystem.CurDir
tata = ActiveWorkbook.FullName
testA = Left(tata, InStr(tata, ":") - 1)
 
B

Bernard Reu

Sorry for the double-posting of an unfinished message. I
have unwillingly typed a wrong key.

well, these two function can give you the expected result:

MyString1 = FileSystem.CurDir ' or:
'MyString2 = ActiveWorkbook.FullName
test = Left(MyString1, InStr(MyString1, ":") - 1)

You have to consider the PathSeparator on Mac OS is ":"
instead of "\"

If you think of writing a cross platform macro, it could
then be:

MySep = Application.PathSeparator
test = Left(MyString1, InStr(MyString1, MySep) - 1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top