Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
not calling
will someone tell me why this does't call the macro. This is in the code for
a user form. It is acessed by an option button. Do I need to put the macro procedure into the code of the option button? Thanks Private Sub OptionButton30_Click() 'Announcer Cards Call AAAA Worksheets("Data").Range("A4:A100,D4:D100,E4:E100, G4:G100,L4:L100").Copy Worksheets("Announcer").Range("A2").PasteSpecial Paste:=xlValues Application.CutCopyMode = False 'Destination:=Worksheets("Announcer").Range("A2") End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
not calling
If the macro is in the standard module, it should run. I don't even use Call
for mine. I just put the procedure name on a line and it runs, so you either have the macro as a private sub or there is some other disconnect. "Curt" wrote: will someone tell me why this does't call the macro. This is in the code for a user form. It is acessed by an option button. Do I need to put the macro procedure into the code of the option button? Thanks Private Sub OptionButton30_Click() 'Announcer Cards Call AAAA Worksheets("Data").Range("A4:A100,D4:D100,E4:E100, G4:G100,L4:L100").Copy Worksheets("Announcer").Range("A2").PasteSpecial Paste:=xlValues Application.CutCopyMode = False 'Destination:=Worksheets("Announcer").Range("A2") End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
not calling
Hi Curt,
I attached your code to a cmd button (Right click the button and view code) on a uaerform and created a workbook module call Sub AAAA() and it worked perfectly for me. Mike "Curt" wrote: will someone tell me why this does't call the macro. This is in the code for a user form. It is acessed by an option button. Do I need to put the macro procedure into the code of the option button? Thanks Private Sub OptionButton30_Click() 'Announcer Cards Call AAAA Worksheets("Data").Range("A4:A100,D4:D100,E4:E100, G4:G100,L4:L100").Copy Worksheets("Announcer").Range("A2").PasteSpecial Paste:=xlValues Application.CutCopyMode = False 'Destination:=Worksheets("Announcer").Range("A2") End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
not calling
Hi,
Ensure your Sub AAAA() is a public or standard sub or not a Private Sub... and also Sub AAAA() is a procedure in a same VBAProject too. -- Regards, Halim "JLGWhiz" wrote: If the macro is in the standard module, it should run. I don't even use Call for mine. I just put the procedure name on a line and it runs, so you either have the macro as a private sub or there is some other disconnect. "Curt" wrote: will someone tell me why this does't call the macro. This is in the code for a user form. It is acessed by an option button. Do I need to put the macro procedure into the code of the option button? Thanks Private Sub OptionButton30_Click() 'Announcer Cards Call AAAA Worksheets("Data").Range("A4:A100,D4:D100,E4:E100, G4:G100,L4:L100").Copy Worksheets("Announcer").Range("A2").PasteSpecial Paste:=xlValues Application.CutCopyMode = False 'Destination:=Worksheets("Announcer").Range("A2") End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
calling C# DLL from VBA | Excel Programming | |||
Calling a Sub from another | Excel Programming | |||
Need Help using/calling a DLL | Excel Programming | |||
Need Help Using/Calling DLL Please | Excel Programming | |||
Calling SUB | Excel Programming |