K
Ken Loomis
When I send my workbook to someone to run, it bombs and crashes Excel. No
warnings, No Message. No nothing.
I used this Function from Chip Peasron to determine if a file exits:
Function SheetExists(sname As String, _
Optional ByVal wb As Workbook) As Boolean
MarkSub "SheetExists"
' Chip Pearson
On Error Resume Next
If wb Is Nothing Then Set wb = ThisWorkbook
SheetExists = CBool(Len(wb.Sheets(sname).Name))
End Function
============
I call that function with this if statement:
If Not SheetExists("Oldfiles", ActiveWorkbook) Then
=============
I do not really understand the "File Exists" function, but it works fine on
my system.
Using a GetInfo routine I got from somewhere, I have been able to capture
the following information about the system where this crashes, if it helps:
Application Name 10.0
Operating system Windows (32-bit) 4.90
Application Path C:\PROGRAM FILES\OFFICEXP\OFFICE10
Library Path C:\PROGRAM FILES\OFFICEXP\OFFICE10\LIBRARY
On my system, where the program works, that GetInfo routine captures this:
Application Name 11.0
Operating system Windows (32-bit) NT 5.01
Application Path C:\Program Files\Microsoft Office\OFFICE11
Library Path C:\Program Files\Microsoft Office\OFFICE11\LIBRARY
Sorry for the bad formatting.
I hope I haven't provided too much information, but if you should need more
please let me know.
Please help me figure this out.
TIA,
Ken Loomis
warnings, No Message. No nothing.
I used this Function from Chip Peasron to determine if a file exits:
Function SheetExists(sname As String, _
Optional ByVal wb As Workbook) As Boolean
MarkSub "SheetExists"
' Chip Pearson
On Error Resume Next
If wb Is Nothing Then Set wb = ThisWorkbook
SheetExists = CBool(Len(wb.Sheets(sname).Name))
End Function
============
I call that function with this if statement:
If Not SheetExists("Oldfiles", ActiveWorkbook) Then
=============
I do not really understand the "File Exists" function, but it works fine on
my system.
Using a GetInfo routine I got from somewhere, I have been able to capture
the following information about the system where this crashes, if it helps:
Application Name 10.0
Operating system Windows (32-bit) 4.90
Application Path C:\PROGRAM FILES\OFFICEXP\OFFICE10
Library Path C:\PROGRAM FILES\OFFICEXP\OFFICE10\LIBRARY
On my system, where the program works, that GetInfo routine captures this:
Application Name 11.0
Operating system Windows (32-bit) NT 5.01
Application Path C:\Program Files\Microsoft Office\OFFICE11
Library Path C:\Program Files\Microsoft Office\OFFICE11\LIBRARY
Sorry for the bad formatting.
I hope I haven't provided too much information, but if you should need more
please let me know.
Please help me figure this out.
TIA,
Ken Loomis