I have 5 checkboxes on sheet 1 of excel 2007 document. I need code/vba/macro (something) to make sure that at least one is picked but all can be picked before save/close.
I have 5 checkboxes on sheet 1 of excel 2007 document. I need code/vba/macro (something) to make sure that at least one is picked but all can be picked before save/close.
Hi 3earth
It depends on what kind of Check Boxes your usingorPlease Login or Register to view this content.
Please Login or Register to view this content.
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.
This code works beautifully. I cannot get my tab order to work. The code below is my tab order.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim iNew As Long
If IsEmpty(aTabOrd) Then
aTabOrd = Array("D3", "L3", "D5", "L5", "D7", "L7", "A9", "L9", "D12", "M12", _
"E17", "F17", "G17", "E18", "F18", "G18", "E19", "F19", "G19", "E20", "F20", _
"G20", "E21", "F21", "G21", "E22", "F22", "G22", "E23", "F23", "G23", _
"N16", "N16", "N17", "N18", "N19", "N20", "N21", "J22", "N22", "A26", _
"W5", "W6", "W7", "W8", "W9", "W10", "W11", "W12", "W13", "W14", "R15", "W15", _
"W19", "W20", "W21", "R22", "W22", "R28", "T28", "V28", "R30", "T30", "V30", _
"R37", "T37", "V37", "V39", "Q42")
nTab = UBound(aTabOrd) + 1
ITab = 0
Else
On Error Resume Next
iNew = WorksheetFunction.Match(Target(1, 1).Address(False, False), aTabOrd, 0) - 1
If Err Then
ITab = (ITab + 1) Mod nTab
Else
ITab = iNew
End If
On Error GoTo 0
End If
Application.EnableEvents = False
Range(aTabOrd(ITab)).Select
Application.EnableEvents = True
End Sub
I have merged cells.
NOTE: Forms Toolbox is the one that worked for me.
thank you
Hi 3earth
Please use Code Tags around any Code you post...see Forum Rule #3.
What does thishave to do with thisI cannot get my tab order to workPost your file (with existing Code) and let us know what you're trying to do...otherwise, we're just guessing.I need code/vba/macro (something) to make sure that at least one is picked but all can be picked before save/close.
Last edited by jaslake; 03-25-2013 at 05:32 PM.
I would like to force the tab order in this document as well as require at least one checkbox (1-7) is choosen.
Hi 3earth
I've no personal experience with this but I'll be happy to work on it with you. Having said that, I believe this should be an issue of a new Thread. If you wish to PM me with the Link to that new Thread please feel free to do so.
In the meantime check out this Link
http://www.ozgrid.com/forum/showthread.php?t=82272
The link did it. I deleted the beginning of the code and did not realize that I had. That is why tab order did not work.
The link is what I used to force tab order with merged cells. Thank you so much for your help.
Hi 3earth
Glad you got it resolved. How about posting your Code so we can all learn..As I stated, I have no personal experience with this and I'd like to see it in action.
The code to force tab order with merged cells.
You will need to modify the cells to your cells. For merged cells, I used the first letter number.Please Login or Register to view this content.
Last edited by 3earth; 03-27-2013 at 12:30 PM. Reason: forgot to add need to modify cells for your document
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks