#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 182
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calling C# DLL from VBA Paul Excel Programming 3 November 4th 06 07:29 PM
Calling a Sub from another shashi1515[_4_] Excel Programming 5 February 4th 06 03:57 AM
Need Help using/calling a DLL Trip[_3_] Excel Programming 1 January 9th 06 01:36 PM
Need Help Using/Calling DLL Please Trip[_3_] Excel Programming 0 January 8th 06 09:57 AM
Calling SUB Peter Longstaff Excel Programming 2 February 23rd 04 08:04 PM


All times are GMT +1. The time now is 12:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"