VBA Range Problem-Range("srt:fnsh").Select No Good


Posted by Bagsy Baker on January 27, 2002 4:53 PM

Can someone please tell me what I am doing wrong? I am setting up a Purchase Order Spreadsheet that copies information from a header page to the entry page itself. I've created the code to create a newsheet with the PO as it's name, then return to the "Log" sheet to copy the active header information to the new sheet. When I try to specify a range for selection I get a 1004 Error " Method 'Range' of object '_Global' failed " If you debug, the "srt" and "fnsh" do equal the cells I want, but the Range kicks out. Very frustrating!!!! Any help would be appreciated.

' Copy Header Information to New PO


Dim srt
Dim fnsh
Sheets("Log").Select
Range("b1").Select
srt = "a" & bottomrw
fnsh = "z" & bottomrw


Range("srt:fnsh").Select
Application.CutCopyMode = True
Selection.Copy
Sheets(newsheet).Select
ActiveSheet.Paste



Posted by Launce on January 27, 2002 5:13 PM

Range(srt & ":" & fnsh).Select

Range("srt:fnsh").Select Application.CutCopyMode = True Selection.Copy Sheets(newsheet).Select ActiveSheet.Paste