Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Button in Form

I have a problem,
there´s a form, which is accessable via a single button in a sheet.
In this form there´s another button called GO, so i have:

Private Sub Go_Click()
MsgBox ("button clicked... ")
End Sub

When I click this button in my form, nothing happen... the MsgBox warning
does not shows.

What can be the problem here?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Button in Form

Open the VB editor by pressing Alt + F11 and select your form from the
project window. Right click the command button on the form and select view
code.
Then enter the code below.

Private Sub CommandButton1_Click()
MsgBox ("button clicked... ")
End Sub

Re-post if it still don't work.


"bbussoloti" wrote:

I have a problem,
there´s a form, which is accessable via a single button in a sheet.
In this form there´s another button called GO, so i have:

Private Sub Go_Click()
MsgBox ("button clicked... ")
End Sub

When I click this button in my form, nothing happen... the MsgBox warning
does not shows.

What can be the problem here?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Button in Form

Tks for the answer JLGWhiz, but it still don´t work... i actually renamed my
button "Go" instead of "CommandButton1". I tried what you said just in case,
but no success.

This form i have is accessable via a button NOT in a form. Then, when the
form is open, there´s my Go button, which does not displays the MsgBox... i´m
stuck here.

"JLGWhiz" escreveu:

Open the VB editor by pressing Alt + F11 and select your form from the
project window. Right click the command button on the form and select view
code.
Then enter the code below.

Private Sub CommandButton1_Click()
MsgBox ("button clicked... ")
End Sub

Re-post if it still don't work.


"bbussoloti" wrote:

I have a problem,
there´s a form, which is accessable via a single button in a sheet.
In this form there´s another button called GO, so i have:

Private Sub Go_Click()
MsgBox ("button clicked... ")
End Sub

When I click this button in my form, nothing happen... the MsgBox warning
does not shows.

What can be the problem here?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Button in Form

Ok... i´ve made it work.
Instead of writing the code in the (general) session, i right clicked the
button in the form, selected show code, and it opened a new window with my
button´s name where it was that (general)

"bbussoloti" escreveu:

I have a problem,
there´s a form, which is accessable via a single button in a sheet.
In this form there´s another button called GO, so i have:

Private Sub Go_Click()
MsgBox ("button clicked... ")
End Sub

When I click this button in my form, nothing happen... the MsgBox warning
does not shows.

What can be the problem here?

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
Form button Thor Excel Discussion (Misc queries) 1 May 5th 07 09:37 PM
Command Button vs Form Button Bri[_3_] Excel Programming 2 February 3rd 06 08:18 AM
Pause macro, add form button to sheet, continue macro when button clicked! Flystar[_15_] Excel Programming 1 May 26th 04 09:45 AM
Form Button Todd Huttenstine Excel Programming 1 May 25th 04 02:10 PM
Command Button vs Form Button T K Excel Programming 4 August 26th 03 07:26 PM


All times are GMT +1. The time now is 01:27 AM.

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"