Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Redundant
The third line does not work, so I commented it out and am using the 4th
line, but this seems a little redundant to me. What is wrong with it. Set WB = Workbooks("Template_CK Ordered.xls") Set SH = WB.Sheets("CO_Template") 'Set rDestCell = WB.SH.Range("A2") Set rDestCell = Workbooks("Template_Ck Ordered.xls").Worksheets("CO_Template").Range("A2" ) Set wkbkCSV = Workbooks.Open(Filename:=sFile1) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Redundant
Set WB = Workbooks("Template_CK Ordered.xls")
Set SH = WB.Sheets("CO_Template") Set rDestCell = SH.Range("A2") Set wkbkCSV = Workbooks.Open(Filename:=sFile1) You don't need the WB in the 3rd line. SH already knows it belongs to WB. -- Regards, Tom Ogilvy "Striker" wrote: The third line does not work, so I commented it out and am using the 4th line, but this seems a little redundant to me. What is wrong with it. Set WB = Workbooks("Template_CK Ordered.xls") Set SH = WB.Sheets("CO_Template") 'Set rDestCell = WB.SH.Range("A2") Set rDestCell = Workbooks("Template_Ck Ordered.xls").Worksheets("CO_Template").Range("A2" ) Set wkbkCSV = Workbooks.Open(Filename:=sFile1) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Consolidating Redundant Text | Excel Worksheet Functions | |||
Redundant data | Excel Discussion (Misc queries) | |||
minimizing redundant code | Excel Programming | |||
Password redundant through use of cancel | Excel Discussion (Misc queries) | |||
finding redundant data | Excel Worksheet Functions |