I have a spreadsheet with a list of daily job tasks that need to be put into a list box and to be counted as they are performed.
so I want to hit a command button and change the value of a cell up and down (based on the value of the list box)
and specify which worksheet (based on the option button selected)
I have a worksheet for each day of the work week.
So if option button 1 called monday is selected then i need the user form to refer to the proper worksheet..
I have the command buttons working for a particular cell but don't know how to use the If else statements
Please help..i know how to do formulas in a spreadsheet, but user forms programming is new to me..
Private Sub CommandButton1_Click() Unload Me End Sub Private Sub CommandButton4_Click() Range("b1").Value = Range("b1").Value + 1 End Sub Private Sub CommandButton5_Click() Range("b1").Value = Range("b1").Value - 1 End Sub Private Sub ListBox1_Click() End Sub Private Sub OptionButton1_Click() End Sub Private Sub OptionButton2_Click() End Sub Private Sub UserForm_Click() End Sub
Last edited by royUK; 04-07-2010 at 01:01 PM.
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
I've added the Code Tags,make sure that you read the Forum Rules before posting again.
Attaching an example workbook would help
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
sorry! thanks..it's my first post..and i'm at work
I attached the spreadsheet if that helps...
What i'm doing is creating a clicker to tally things as u go instead of writing marks on paper and then entering them in at the end of the day
i don't need the option buttons if i put this form on each worksheet. But do i have to write a line of code for each value in the list box?
I want the program to see the current selection in the list box and refer to the proper row in the spreadsheet where it is listed.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks