Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi:
Please Assume: a Workbook named Invoice and Worksheets named "Invoice" and "Parts List" a Form Button Object and a Command Button on the ("Invoice") Sheet The following Macro attached to the form button works as expected . Sub test1() ' test1 Macro ' Shortcut: Ctrl+z Sheets("Parts List").Select Range("U3:U51").Select Selection.Copy Range("E3").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlAdd, SkipBlanks:= _ False, Transpose:=False Application.CutCopyMode = False Range("G22").Select Sheets("Invoice").Select Range("D7").Select End Sub The same code attached to the Command Button does not work even if I fully quality the Workbook or try to as follows Private Sub CommandButton1_Click() '( Application.Workbooks("Invoice.xls").Worksheets("P arts List"). Range("U3:U51").Select) Sheets("Parts List").Select .... ... Range("D7").Select End Sub Any help or direction will be greatly appreciated T K |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro attached to command button - VBA form | Excel Discussion (Misc queries) | |||
opening a worksheet with a command button on a form | Excel Discussion (Misc queries) | |||
User form and Command button | Excel Discussion (Misc queries) | |||
Command Button on User form for Printing | Excel Discussion (Misc queries) | |||
Command button on data-entry form | Excel Discussion (Misc queries) |