Article ID: 138822 - Last Review: August 19, 2003 - Revision: 1.1 How to Use the MacID Function
This article was previously published under Q138822 On This PageSUMMARY
The Visual Basic for Applications MacID function is unique to the
Macintosh platform and can be used when you use the Kill, Shell, Dir, and
AppActivate functions. Because the Macintosh does not support wild cards,
you can instead use the MacID function to specify the file type of a group
of files.
MORE INFORMATION
The following macro code examples use the MacID function, as well as the
equivalent Microsoft Excel for Windows code. Note, in each of the four examples below, the argument for the MacID function should be a text string (note that this string is case sensitive). Also, you may want to rebuild your desktop if the MacID function does not work as you expect. For more information about Rebuilding the Desktop, please see the following article in the Microsoft Knowledge Base: 82980
(http://support.microsoft.com/kb/82980/EN-US/
)
Excel: Unexpected Quit Under Macintosh System 7.0.x
Kill Statement
Macintosh Kill MacID("TEXT")
Windows Kill "*.txt"
Dir Function
Macintosh myfile = Dir("HD:MyFolder:", MacID("XLS5"))
Windows myfile = Dir("c:\mydir\*.xls")
Shell Function
Macintosh myprog = Shell(MacID("MSWD"))
Windows myprog = Shell("C:\Msoffice\Winword\Winword.exe")
AppActivate Statement
Macintosh AppActivate MacID("MSWD")
Windows AppActivate "Microsoft Word"
REFERENCES
For more information about the MacID Function, click the Index tab in
Microsoft Excel Help, type the following text
macid | Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email

Back to the top
