Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with "Range"
Using Excel 2002 SP3
This code works: Sub Zloaddata() phyfile = ThisWorkbook.Name phypath = ThisWorkbook.Path & "\" Workbooks(phyfile).Sheets("PHY").Activate Workbooks(phyfile).Sheets("PHY").Range(Columns(1), Columns(250)).Delete This code results in "Run-time error 1004 Application-defined or Object-defined error" Sub CommandButton3_Click() phyfile = ThisWorkbook.Name phypath = ThisWorkbook.Path & "\" Workbooks(phyfile).Worksheets("PHY").Activate ActiveWorkbook.Sheets("PHY").Range(Columns(1), Columns(250)).Delete Why does the 2nd example result in the run-time error ? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem viewing back the "Unfiltered range" | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
problem with Linking workbooks via "copy" and "paste link" | Excel Discussion (Misc queries) | |||
Using "Cells" to write "Range("A:A,H:H").Select" | Excel Programming |