I have a spread sheet that saves 2 of its tab to a file with a specific name.
Problem is that when my Customer (Who has Excel 2002) gets the file, It comes up with the message
"The file you are trying to open, '5312a863-4-PILLAR CTR INR UPR-110315gg.xls,
is in a different format than specified by the file extension.
Verify that the file is not corrupt and is from a trusted source before opening the file.
Do you want to open the file now?"
YES NO and HELP are the options that come up. When the Customer selects yes the spreadsheet comes up blank. I get the same message when I call up the Exported file also, but when I save as again to Excel 97-2003 Workbook .xls. And open the file the message goes away. Another issue I have when I double click the Exported file it calls up the Master File that it was created from (I don't want this to happen).
Please see my code below, I had help writing this when I was running 2003.
Please HELP!!!
Thank You
Problem is that when my Customer (Who has Excel 2002) gets the file, It comes up with the message
"The file you are trying to open, '5312a863-4-PILLAR CTR INR UPR-110315gg.xls,
is in a different format than specified by the file extension.
Verify that the file is not corrupt and is from a trusted source before opening the file.
Do you want to open the file now?"
YES NO and HELP are the options that come up. When the Customer selects yes the spreadsheet comes up blank. I get the same message when I call up the Exported file also, but when I save as again to Excel 97-2003 Workbook .xls. And open the file the message goes away. Another issue I have when I double click the Exported file it calls up the Master File that it was created from (I don't want this to happen).
Please see my code below, I had help writing this when I was running 2003.
Code:
Private Sub btnCopyUSReports_Click()
Me.Hide
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Sheets("ScheduleA").Visible = True
Sheets("ScheduleA").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="elvis1"
ActiveSheet.EnableSelection = xlNoSelection
Sheets("ScheduleB1").Visible = True
Sheets("ScheduleB1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="elvis1"
ActiveSheet.EnableSelection = xlNoSelection
Sheets(Array("ScheduleA", "ScheduleB1")).Select
Sheets(Array("ScheduleA", "ScheduleB1")).Copy
ActiveWorkbook.UpdateLinks = xlUpdateLinksNever
NameofFile = "S:\PROJDATA\INITIAL\" & Range("ScheduleA!AG1") ' PART NUMBER - PART NAME - DATE
Set NewBook = Application.ActiveWorkbook
fileSaveName = Application.GetSaveAsFilename(NameofFile, fileFilter:="Excel 97-2003 Workbook (*.xls), *.xls") 'Excel Files
If fileSaveName <> False Then
NewBook.SaveAs Filename:=fileSaveName
End If
ActiveWindow.Close
Sheets("ScheduleA").Select
ActiveSheet.Unprotect Password:="elvis1"
Sheets("ScheduleA").Visible = False
Sheets("ScheduleB1").Select
ActiveSheet.Unprotect Password:="elvis1"
Sheets("ScheduleB1").Visible = False
UserForm.Show
End Sub
Please HELP!!!
Thank You
Last edited by a moderator: