PC Review


Reply
Thread Tools Rate Thread

Button in Form

 
 
bbussoloti
Guest
Posts: n/a
 
      22nd Nov 2007
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 With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      22nd Nov 2007
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?

 
Reply With Quote
 
bbussoloti
Guest
Posts: n/a
 
      23rd Nov 2007
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?

 
Reply With Quote
 
bbussoloti
Guest
Posts: n/a
 
      23rd Nov 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fake a button click for HTTP form button harleyman1974@gmail.com Microsoft ASP .NET 2 21st Nov 2005 06:59 PM
Custom button from a Control class doesn't appear as a choice for OK/Cancel button in a Form properties CroDude Microsoft C# .NET 3 28th Jun 2005 06:27 PM
Windows XP Button vs Framework window form button A-PK Microsoft Dot NET Framework Forms 6 1st Mar 2004 07:59 PM
how do I keep a form open but only process code after the form after a certain button on the form is clicked? Keith G Hicks Microsoft Access Form Coding 1 3rd Dec 2003 08:14 PM
JavaScript Access to Button in form tags (webcontrol or html button) Wes Weems Microsoft ASP .NET 1 20th Jul 2003 06:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:42 PM.