Hi
I wonder if anyone can help me.
An application that runs OK on my laptop, another laptop and a desktop (XP professional 2002 SP3; MS Office 2003 standard with SP3) will not run on two other machines (laptop – Office 2007, XP Pro SP3 and on the second – desktop – Office 2003 SP3, XP Pro SP3).
I assume that it is something to do with XP Pro SP3.
Can anyone let me know how to fix this or what I am doing wrong.
Following is the piece of code where the error occurs
'''################
MsgBox "An appropriate message is inserted here in my code."
CC_DB_Data_File_Path_and_Name = Application _
.GetOpenFilename("Excel Files (*.xls), *.xls")
Set fs = CreateObject("Scripting.FileSystemObject")
CC_DB_Data_File_Name = fs.GetFileName(CC_DB_Data_File_Path_and_Name)
ActiveWorkbook.Names.Item("Primary_GCF_File_Name").RefersToRange.Value = CC_DB_Data_File_Name
If CC_DB_Data_File_Path_and_Name = "False" Then
MsgBox "The remainder of this operation cannot be executed."
Exit Sub
Else
End If
Workbooks.Open Filename:=CC_DB_Data_File_Path_and_Name
Windows(CC_DB_Data_File_Name).Activate
''######################
The error occurs with the line "Windows(CC_DB_Data_File_Name).Activate"
Any help is appreciated.
Thank you.
I wonder if anyone can help me.
An application that runs OK on my laptop, another laptop and a desktop (XP professional 2002 SP3; MS Office 2003 standard with SP3) will not run on two other machines (laptop – Office 2007, XP Pro SP3 and on the second – desktop – Office 2003 SP3, XP Pro SP3).
I assume that it is something to do with XP Pro SP3.
Can anyone let me know how to fix this or what I am doing wrong.
Following is the piece of code where the error occurs
'''################
MsgBox "An appropriate message is inserted here in my code."
CC_DB_Data_File_Path_and_Name = Application _
.GetOpenFilename("Excel Files (*.xls), *.xls")
Set fs = CreateObject("Scripting.FileSystemObject")
CC_DB_Data_File_Name = fs.GetFileName(CC_DB_Data_File_Path_and_Name)
ActiveWorkbook.Names.Item("Primary_GCF_File_Name").RefersToRange.Value = CC_DB_Data_File_Name
If CC_DB_Data_File_Path_and_Name = "False" Then
MsgBox "The remainder of this operation cannot be executed."
Exit Sub
Else
End If
Workbooks.Open Filename:=CC_DB_Data_File_Path_and_Name
Windows(CC_DB_Data_File_Name).Activate
''######################
The error occurs with the line "Windows(CC_DB_Data_File_Name).Activate"
Any help is appreciated.
Thank you.
Last edited: