#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Buttons

I have made a button in the ordinary Excel-interface by using
ViewToolbarsForms. The button is supposed to call a larger program that I
have in a modul. However, I fail to connect the button to the macro. The
button is placed in Sheet1. In VisualBasic for Sheet1 I have the following
code:

Private Sub main_program_button_Click()
Call mainProgram
End Sub

The main program is found in the modul. Since I created the button in Excel
I do not know how to get the code descibed above to connect to the button.
Please help needed!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Buttons

Right-click on the button, choose "Assign macro...", then select the macro
you want to attach to the button from the macros list.

"april27" wrote:

I have made a button in the ordinary Excel-interface by using
ViewToolbarsForms. The button is supposed to call a larger program that I
have in a modul. However, I fail to connect the button to the macro. The
button is placed in Sheet1. In VisualBasic for Sheet1 I have the following
code:

Private Sub main_program_button_Click()
Call mainProgram
End Sub

The main program is found in the modul. Since I created the button in Excel
I do not know how to get the code descibed above to connect to the button.
Please help needed!!!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default Buttons

Forms buttons are linked via a macro assign. Right-click the button, and
select Assign Macro from there.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"april27" wrote in message
...
I have made a button in the ordinary Excel-interface by using
ViewToolbarsForms. The button is supposed to call a larger program that

I
have in a modul. However, I fail to connect the button to the macro. The
button is placed in Sheet1. In VisualBasic for Sheet1 I have the following
code:

Private Sub main_program_button_Click()
Call mainProgram
End Sub

The main program is found in the modul. Since I created the button in

Excel
I do not know how to get the code descibed above to connect to the button.
Please help needed!!!



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
Option Buttons/Radio Buttons John Calder New Users to Excel 7 May 16th 08 03:51 AM
Form buttons vs. ActiveX Buttons GeorgeJ Excel Discussion (Misc queries) 3 August 11th 07 09:02 PM
have toggle buttons but everytime print preview buttons move TinSandhu Excel Discussion (Misc queries) 1 October 11th 06 02:57 PM
pivot chart is it possible to hide individual field buttons? Layout Field buttons Matt Charts and Charting in Excel 0 August 27th 06 02:57 PM
Control Buttons vs. Command Buttons Robert Gibson Excel Programming 1 October 13th 03 04:33 PM


All times are GMT +1. The time now is 11:12 PM.

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

About Us

"It's about Microsoft Excel"