Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i hav a userfrom, on this 2 button.
to 1 of these i want to attach an IF statement sayin if this button is pressed enter data onto 2nd line in the spreadsheet. does ne1 kno the correct terminology?? thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To do this all you need to do is to look at the correct event Handler
of the Buttons from your Userform select view code then Select your first button name from the drop down list and click should be autoselected then you could add code in the subroutine like this Private Sub cmdButton1_Click() Worksheets("Sheet1").Range("A2").Value = "Button1" End Sub repeat as needed Hope this Helps Davi -- Message posted from http://www.ExcelForum.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You don't need an if as the button has a click event which is effectively
telling your code that it has been clicked. Private Sub CommandButton1_Click() Msgbox "Button1 clicked" End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Manisha" wrote in message ... i hav a userfrom, on this 2 button. to 1 of these i want to attach an IF statement sayin if this button is pressed enter data onto 2nd line in the spreadsheet. does ne1 kno the correct terminology?? thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CSE Formula Prob | Excel Worksheet Functions | |||
quotient function prob. i have copied example but it gives error | Excel Discussion (Misc queries) | |||
Macro Prob | Excel Worksheet Functions | |||
Counting prob | Excel Discussion (Misc queries) | |||
how to use the Prob function in a list of averages to find the le | Excel Worksheet Functions |