Date Statement (Apple Power Macintosh)

For the Macintosh, date must be a date from January 1, 1904 through February 5, 2040.


Call Statement (Apple Power Macintosh)

ByVal and ByRef can be used with Call when making a call to a Macintosh code resource.


Shell Function (Apple Power Macintosh
Shell Function (Apple Power Macintosh)

The Shell function syntax has these named arguments:

Part	Description
pathname	On the Macintosh, you can use the MacID function to specify an application's signature instead of its name. The following example uses the signature for Microsoft Word:
	Shell MacID("MSWD")
windowstyle	On the Macintosh (System 7.0 or later), windowstyle only determines whether or not the application gets the focus when it is run.
The vbHide constant is not applicable on Apple Macintosh platforms.


Declare Statement (Apple Power Macintosh)

On the Power Macintosh, the Declare syntax is the same as in Windows, except that the CDecl keyword can be used to indicate that the procedure uses C language argument order, naming conventions, and calling conventions:

[Public | Private ] Declare Function name [CDecl] Lib "libname" [Alias "aliasname" ] [([arglist])] [As type]

The Alias keyword indicates that the procedure being called is in a Macintosh code resource. This is useful when the external procedure name is the same as a keyword.

Use the aliasname to specify the code resource type as follows:

"[resourcetype]$[resourcename]"

The resourcetype is any valid 4-character constant. If omitted, the default resourcetype is CODE. The resourcename is the procedure name in the code resource. If resourcename is omitted, it is assumed to be the same as name.

On the Power Macintosh, the Declare statement supports calls into native code for code fragments only. Calling into code resources is also supported, but only in 68000 emulation mode.

When used on the Power Macintosh, the Declare statement syntax is as follows:

Declare Function MyFunction Lib "hd:system folder:extensions:MyCodeFragment" Alias "MyFunction" () As Long

For both code fragments and code resources, a full or partial pathname may be specified for the Lib clause. If the specified Lib clause is ambiguous, it is resolved as follows:

•	If the file contains a 'cfrg' resource, it's treated as a code fragment.

•	If it doesn't contain a 'cfrg' resource, it is treated as a file containing code resources.

This allows the creation of "fat" code fragments, that is, files that contain both code fragments and 68000 code resources. When running Visual Basic for Applications on a 68000 Macintosh, the code resource is used. When running it on a Power Macintosh, the native code fragment is used.

The Macintosh toolbox can be accessed on the Power Macintosh using a declaration into the system code fragment.


ChDir Statement (Apple Power Macintosh)

On the Power Macintosh, the default drive always changes to the drive specified in path. Full path specifications begin with the volume name, and relative paths begin with a colon (:). ChDir resolves any aliases specified in the path:

ChDir "MacDrive:Tmp"	' On the Macintosh.

Note that when making relative directory changes, different symbols are used in Microsoft Windows and on the Macintosh:

ChDir ".."	' Moves up one directory in Microsoft Windows.

ChDir "::"	' Moves up one directory on the Macintosh.


Dir Function (Apple Power Macintosh),;
Dir Function (Apple Power Macintosh)

In Microsoft Windows, Dir supports the use of multiple character (*) and single character (?) wildcards to specify multiple files. On the Macintosh, these characters are treated as valid file name characters and can't be used as wildcards to specify multiple files.

Since the Macintosh doesn't support the wildcards, use the file type to identify groups of files. You can use the MacID function to specify file type instead of using the file names. For example, the following statement returns the name of the first TEXT file in the current folder:

Dir("SomePath", MacID("TEXT"))

To iterate over all files in a folder, specify an empty string:

Dir("")

If you use the MacID function with Dir in Microsoft Windows, an error occurs.

Any attribute value greater than 256 is considered a MacID value.

The following constants aren't available on the Macintosh:

Constant	Value	Description
vbSystem	4	System file
vbVolume	8	Volume label
The following constant is available only on the Macintosh:

Constant	Value	Description
vbAlias	64	Specified file name is an alias.


GetAttr Function (Apple Power Macintosh),;
GetAttr Function (Apple Power Macintosh)

The following constants aren't available on the Macintosh:

Constant	Value	Description
vbSystem	4	System file
vbArchive	32	File has changed since last backup.
The following constant is available only on the Macintosh:

Constant	Value	Description
vbAlias	64	Specified file name is an alias.


Kill Statement (Apple Power Macintosh),;
Kill Statement (Apple Power Macintosh)

In Microsoft Windows, Kill supports the use of multiple character (*) and single character (?) wildcards to specify multiple files. However, on the Macintosh, these characters are treated as valid file name characters and can't be used as wildcards to specify multiple files.

Since the Macintosh doesn't support the wildcards, use the file type to identify groups of files to delete. You can use the MacID function to specify file type instead of repeating the command with separate file names. For example, the following statement deletes all TEXT files in the current folder.

Kill MacID("TEXT")

If you use the MacID function with Kill in Microsoft Windows, an error occurs.


SetAttr Statement (Apple Power Macintosh),;
SetAttr Statement (Apple Power Macintosh)

The following constants aren't available on the Macintosh:

Constant	Value	Description
vbSystem	4	System file
vbArchive	32	File has changed since last backup.
The following constant is available only on the Macintosh

Constant	Value	Description
vbAlias	64	Specified file name is an alias.


Dir, GetAttr, and SetAttr Constants (Apple Power Macintosh)

The following constants aren't available on the Macintosh:

Constant	Value	Description
vbSystem	4	System file
vbVolume	8	Volume label
vbArchive	32	File has changed since last backup.
The following constant is available only on the Macintosh

Constant	Value	Description
vbAlias	64	Specified file name is an alias.


StrConv Constants (Apple Power Macintosh)

The following constants aren't available on the Macintosh:

Constant	Value	Description
vbUnicode***	64***	Converts the string to Unicode using the default code page of the system. Specifying this bit on the Macintosh or Windows 16-bit systems causes a run-time error.
vbFromUnicode***	128***	Converts the string from Unicode to the default code page of the system. Specifying this bit on the Macintosh or Windows 16-bit systems causes a run-time error.


ChDrive Statement (Apple Power Macintosh)

On the Macintosh, ChDrive changes the current folder to the root folder of the specified drive.


CurDir Function
CurDir Function (Apple Power Macintosh)

The optional drive argument is a string expression that specifies an existing drive. CurDir ignores any drive specified and simply returns the path for the current drive.


RGB Function (Apple Power Macintosh)

The RGB color values returned by this function are incompatible with those used by the Macintosh operating system. They may be used within the context of Microsoft applications for the Macintosh, but should not be used when communicating color changes directly to the Macintosh operating system.


Like Operator (Apple Power Macintosh)

On the Macintosh, sort order is determined by the character set.


Option Compare Statement (Apple Power Macintosh)

On the Macintosh, sort order is determined by the character set.


Object library not registered (Apple Power Macintosh)

Delete the Macintosh Preferences folder and restart your application.