Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
problems when moving code from Macro to Command button on sheet
You could have the CommandButton call the macro that works.
The problem is likely this line: Set myC = Range("I6:I233").Find(What:="", LookAt:=xlWhole) Excel takes the range to be on whatever the active sheet is. If you change it to: Set myC = Worksheets.("Printout").Range("I6:I233").Find(What :="", LookAt:=xlWhole) the range is better specified. HTH, Merjet |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
moved vba code from macro to command button, now won't work | Excel Programming | |||
Code created in a Macro not working for a Command Button | Excel Programming | |||
Excel - keep a command button from moving after code runs? | Excel Programming | |||
macro code doesnt work in command button | Excel Programming | |||
generating sheet with command button & code | Excel Programming |