Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > microsoft.public.excel.programming > #109143
| From | isabelle <i@v.invalid> |
|---|---|
| Newsgroups | microsoft.public.excel.programming |
| Subject | Re: Capture # of Button pressed to pass to another form |
| Date | 2016-08-02 18:31 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <nnr6vv$1rmk$2@gioia.aioe.org> (permalink) |
| References | <e95c69a9-df35-42ab-9ea4-537e4ea66d7e@googlegroups.com> |
hello,
http://www.cjoint.com/c/FHcwDJybXga
' "Module 1"
'____________________________________________________________
Sub OpenForm()
UserForm1.Show
End Sub
'____________________________________________________________
' "Classe 1"
'____________________________________________________________
Public WithEvents cmdButton As MSForms.commandbutton
Dim cmdButtonName As String
Private Sub cmdButton_Click()
cmdButtonName = Me.cmdButton.Caption
UserForm2.TextBox1 = cmdButtonName
UserForm2.Show
End Sub
'____________________________________________________________
' "UserForm1"
'____________________________________________________________
Dim x() As New Classe1
Private Sub UserForm_Initialize()
Dim a As Integer
For Each c In Me.Controls
If TypeName(c) = "CommandButton" Then
a = a + 1
ReDim Preserve x(1 To a)
Set x(a).cmdButton = c
End If
Next
End Sub
'____________________________________________________________
isabelle
Le 2016-08-02 à 13:23, jlclyde a écrit :
> Hello, I have a form that has six buttons on it. I have another form that I
> would like to capture the button that was pressed. For instance if Bt1 is
> pressed I am hiding current form, opening a different form and putting 1 in a
> text box. Any help would be appreciated.
>
Back to microsoft.public.excel.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Capture # of Button pressed to pass to another form jlclyde <jlclyde.jc@gmail.com> - 2016-08-02 10:23 -0700
Re: Capture # of Button pressed to pass to another form isabelle <i@v.invalid> - 2016-08-02 18:31 -0400
Re: Capture # of Button pressed to pass to another form isabelle <i@v.invalid> - 2016-08-03 03:22 -0400
csiph-web