is that a no one????
is that a no one????
Hi Colhawk
Please attach a file that represents what you have. The structure of your attachment should be the same structure as your actual data. Any proprietary information should be changed.
Include in the attachment any code you're currently using (whether it works or not).
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
Hi,
Thanks for the reply jaslake. I have uploaded a copy of the spreadsheet that I use.
Hi Colhawk
Try this...let me know of issues![]()
Sub CheckBox19_Click() Dim oCheck As Object Set oCheck = Sheet1.CheckBoxes("Check Box 19") If oCheck.Value = 1 Then Range("D2").FormulaR1C1 = _ "=+IF(R[20]C[-2]="""","""",VLOOKUP(R[20]C[-2],'Payment list'!R[1]C[-3]:R[31]C[-2],2))" Range("D3").Select Else Range("D2").Value = "" End If End Sub
Hi jaslake,
Thanks for that solution. It works well for the first 3 people on the timesheet but upon the fourth person when I click the check box it comes up with an error saying "Runtime error 1004. The item with the specified name wasn't found"
I have checked that the checkbox is definitely named Check Box 22 (even cut and paste this in to make sure it was right) but still cannot seem to see why it isnt working, the line it has problems with is coloured in red below.
Thanks for any help you can give!![]()
Sub CheckBox22_Click() Dim oCheck As Object Set oCheck = Sheet1.CheckBoxes("Check Box 22") If oCheck.Value = 1 Then Range("D4").FormulaR1C1 = _ "=+IF(R[18]C[-2]="""","""",VLOOKUP(R[18]C[-2],'Payment list'!R[1]C[-3]:R[31]C[-2],2))" Range("D5").Select Else Range("D4").Value = "" End If End Sub
Last edited by Cutter; 10-17-2012 at 06:58 PM. Reason: Added code tags
Hi Colhawk
First, please wrap your code in code tags.
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
As to your issue...I don't know...there's something that's different. If you'll post the offending file one of us will look at it.
BUT FIRST, please wrap your code in code tags (Rule #3 explains how to do so).
Hi jaslake
Thanks again for helping.
Sorry here is the code for the fourth check box
As i said, for some reason, the first 3 work, and the only thing I have changed is the check box name to the correct one and also the range value in the actual IF formula.![]()
Sub CheckBox22_Click() Dim oCheck As Object Set oCheck = Sheet1.CheckBoxes("Check Box 22") If oCheck.Value = 1 Then Range("D5").FormulaR1C1 = _ "=+IF(R[17]C[-2]="""","""",VLOOKUP(R[17]C[-2],'Payment list'!R[1]C[-3]:R[31]C[-2],2))" Range("D6").Select Else Range("D5").Value = "" End If End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks