D
Dr. Müschenborn
I am relativly new to Mac OS X and have to port an existing
VB-Macro from Excel 97/2000 to Excel X Patch 1.5 on Mac OS X.2.6 or
later.
During the Port I found a couple of missing and/or errorous
functions:
1. FileSystemObject is not implemented.
2. Timer Object is not implemented.
3. Extended System Controls are not implemented.
4. The file listing of a directory does not work:
x = Dir("*.*")
Do While x <> ""
Debug.Print x
x = Dir
Loop
returns after the first call "x = Dir("*.*")" with a Null-String and
the following
loop ist not executed, although the directory was definitely not
empty.
The same result was obtained with "x = Dir("*")".
There was no error message.
5. The writing of data into an file opend for output does not work:
Open "FileName" For Output As #1
Print #1, "Hello World!"
Print #1, "Hello World!"
Close #1
creates the file "FileName", but the file remains empty.
There is no error message.
6. The call of an existing external executable doe not work:
Shell ("ExeName") or
Shell ("ExeName", Modus)
just returns with 0 PID. The executable "ExeName" is neither called
nor executed.
There is no error message, even if "ExeName" is contained in the
current working directory.
7. The call of C-functions in external C-Libraries does not work.
The Standard-C-Library libc.dylib was copied under the names
c, libc.a und libc.dylib into the directory
"/HarddiskName/Library/CFMSupport"
and it was tried to call the standard C-function "strlen" from VB:
Private Declare Function Strlen Lib "c" (ByVal Name) As Integer
Private Declare Function Strlen Lib "libc.a" (ByVal Name) As Integer
Private Declare Function Strlen Lib "libc.dylib" (ByVal Name) As
Integer
Private Declare Function Strlen Lib
"/HarddiskName/Library/CFMSupport/c" (ByVal Name) As Integer
Private Declare Function Strlen Lib
"/HarddiskName/Library/CFMSupport/libc.a" (ByVal Name) As Integer
Private Declare Function Strlen Lib
"/HarddiskName/Library/CFMSupport/libc.dylib" (ByVal Name) As Integer
In each case Runtime error 53 resulted: File (c, libc.a, libc.dylib,
....) not found.
The same result was obtained using a custom dynamic C-Library build
with gcc and libtool.
Can anybody help with (some of) these errors.
There might be just a simple security setting of which I am not avare.
Since there is apparently no documentation available, I am trying this
way.
VB-Macro from Excel 97/2000 to Excel X Patch 1.5 on Mac OS X.2.6 or
later.
During the Port I found a couple of missing and/or errorous
functions:
1. FileSystemObject is not implemented.
2. Timer Object is not implemented.
3. Extended System Controls are not implemented.
4. The file listing of a directory does not work:
x = Dir("*.*")
Do While x <> ""
Debug.Print x
x = Dir
Loop
returns after the first call "x = Dir("*.*")" with a Null-String and
the following
loop ist not executed, although the directory was definitely not
empty.
The same result was obtained with "x = Dir("*")".
There was no error message.
5. The writing of data into an file opend for output does not work:
Open "FileName" For Output As #1
Print #1, "Hello World!"
Print #1, "Hello World!"
Close #1
creates the file "FileName", but the file remains empty.
There is no error message.
6. The call of an existing external executable doe not work:
Shell ("ExeName") or
Shell ("ExeName", Modus)
just returns with 0 PID. The executable "ExeName" is neither called
nor executed.
There is no error message, even if "ExeName" is contained in the
current working directory.
7. The call of C-functions in external C-Libraries does not work.
The Standard-C-Library libc.dylib was copied under the names
c, libc.a und libc.dylib into the directory
"/HarddiskName/Library/CFMSupport"
and it was tried to call the standard C-function "strlen" from VB:
Private Declare Function Strlen Lib "c" (ByVal Name) As Integer
Private Declare Function Strlen Lib "libc.a" (ByVal Name) As Integer
Private Declare Function Strlen Lib "libc.dylib" (ByVal Name) As
Integer
Private Declare Function Strlen Lib
"/HarddiskName/Library/CFMSupport/c" (ByVal Name) As Integer
Private Declare Function Strlen Lib
"/HarddiskName/Library/CFMSupport/libc.a" (ByVal Name) As Integer
Private Declare Function Strlen Lib
"/HarddiskName/Library/CFMSupport/libc.dylib" (ByVal Name) As Integer
In each case Runtime error 53 resulted: File (c, libc.a, libc.dylib,
....) not found.
The same result was obtained using a custom dynamic C-Library build
with gcc and libtool.
Can anybody help with (some of) these errors.
There might be just a simple security setting of which I am not avare.
Since there is apparently no documentation available, I am trying this
way.