Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
I dont understand why this happens
I want to cut column 2, the variable is holding the value 2 but the column 3
is the one selected. This problem is unpredictiable because the selected column can be different. What is happening here and how do I fix it? -- Scott A. Cooper "Cooper, Scott A." wrote: In the following code, columns are correctly identified with debug.print but the wrong columns are selected when the Find function is embedded like the second block of code. Can someone explain what is going on here? ' Code Block 1: Debug.Print .Find("Part Number").Column Debug.Print .Find("Product").Column Debug.Print .Find("Cat").Column Debug.Print .Find("Ext Qty").Column Debug.Print .Find("List Price").Column Debug.Print .Find("Service Months").Column ' Code Block 2: .Columns(.Find("Part Number").Column).Cut oNewWrk.Columns(1).Insert .Columns(.Find("Product").Column).Cut oNewWrk.Columns(2).Insert .Columns(.Find("Cat").Column).Cut oNewWrk.Columns(3).Insert .Columns(.Find("Ext Qty").Column).Cut oNewWrk.Columns(4).Insert .Columns(.Find("List Price").Column).Cut oNewWrk.Columns(5).Insert .Columns(.Find("Service Months").Column).Cut oNewWrk.Columns(6).Insert -- Scott A. Cooper |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Gap or something I cannot understand | Excel Discussion (Misc queries) | |||
Select case statement - it will not work and i dont understand why! :o( | Excel Programming | |||
dont understand compile error | Excel Programming | |||
< |
Excel Worksheet Functions | |||
I dont understand.... | Excel Programming |