myName = ThisWorkbook.Name
If Range("O7") = "Tech - Body" Then
Workbooks.Open FileName:= _
"Q:Body - Chassis.xls"
Sheets("Body").Select
Rows("2:2").Select
Selection.insert Shift:=xlDown
Windows(myName).Activate
Range("B1").Select
Selection.Copy
Windows("Body - Chassis.xls").Activate
Range("A2").Select
ActiveSheet.Paste
Windows(myName).Activate
ActiveWindow.SmallScroll Down:=11
Range("B12").Select
Application.CutCopyMode = False
If the document is opened from a web site, it saves the document in a temp dir, as a temp name. I can't run this macro without getting a "Subscript out of range" I select debug and it points to "Windows(myName).Activate"
Im not sure if this matters but it does open this file as a Read Only. If I save this file as any name, to my HDD, it will run just fine. But I would like to be able to launch this file from the website, and run the macro.
Any tips? Thank you
If Range("O7") = "Tech - Body" Then
Workbooks.Open FileName:= _
"Q:Body - Chassis.xls"
Sheets("Body").Select
Rows("2:2").Select
Selection.insert Shift:=xlDown
Windows(myName).Activate
Range("B1").Select
Selection.Copy
Windows("Body - Chassis.xls").Activate
Range("A2").Select
ActiveSheet.Paste
Windows(myName).Activate
ActiveWindow.SmallScroll Down:=11
Range("B12").Select
Application.CutCopyMode = False
If the document is opened from a web site, it saves the document in a temp dir, as a temp name. I can't run this macro without getting a "Subscript out of range" I select debug and it points to "Windows(myName).Activate"
Im not sure if this matters but it does open this file as a Read Only. If I save this file as any name, to my HDD, it will run just fine. But I would like to be able to launch this file from the website, and run the macro.
Any tips? Thank you