macros on different computers

imported_unknown

Active Member
Joined
Jan 13, 2002
Messages
424
I wrote a macros that works on one computer just fine. then when I load it on another computer I start to get errors for apparently no reason. I am using the same version of VBA and the only differece i can tell between the excel versions is that one computer has a 'sr 2' after Excel 97.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
What are your errors? List your code as well and where the error(s) is(are) occurring.
Tom
 
Upvote 0
I am getting an error in the

"FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False"

then if I delete them out I get an error on the

"Sheets("Cover Sheet").Visible = False".

I don't feel like it is necessarily the code(It could be). But if it is not that I don't know what it could be.

here is the full code.

Sub Save_Clear()
'
' Save_Clear Macro
' Macro recorded 9/12/02 by SCIORTINOJJ
'

' Saves data to file on share page.

Dim Test_Run As Single
Dim PS_SN As Variant
Dim Year As Variant
Dim Month As Variant
Dim Day As Variant

Test_Run = Range("run_number")
PS_SN = Range("PS_SN_main")
Year = Range("I13")
Month = Range("J13")
Day = Range("K13")

' Takes out the autodate function

Sheets("Cover Sheet").Visible = True
Sheets("Cover Sheet").Select
Range("date_main3").Select
Selection.ClearContents
Range("date_main3").Value = Month & "/" & Day & "/" & Year
Sheets("Cover Sheet").Visible = False
Sheets("Main Input Form").Select

'Saves file

ActiveWorkbook.SaveAs FileName:= _
"J:T400PS Trend" & PS_SN & "-" & Year & _
"-" & Month & Day & "-" & Test_Run & ".xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

' Opens new Overhaul Input Form

Workbooks.Open(FileName:= _
"J:T400ProgramsT400 DOS.xls" _
).RunAutoMacros Which:=xlAutoOpen

' Closes saved file.

Windows(PS_SN & "-" & Year & "-" & Month & Day & "-" & Test_Run & ".xls").Activate
ActiveWorkbook.Close SaveChanges:=False

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,618
Members
449,092
Latest member
amyap

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top