Userform ... populate optionbutton from spreadsheet
If Me.optPermanent = True Then
Cells(lCurrentRow, 4).Value = "Permanent"
ElseIf Me.optTemporary = True Then
Cells(lCurrentRow, 4).Value = "Temporary"
Else
Cells(lCurrentRow, 4).Value = "Ex Employee"
End If
Hi Bob,
Your select Case scenario put it in context for me ... and I used the
above code to load info back into my spreadsheet.
Thank you for your time - with your assistance/advice I managed to sort
it :)
Tania
VBAwannabe wrote:
Thanx Bob - over the w/e I will modify the code I have to your
suggestion :()
Tania
Bob Phillips wrote:
What's this, a warning that you will post a real question later?
Maybe something like
Select Case Range("M1").Value
Case "Full-time": optStatus1.Value = True
Case "Part-time": optStatus2.Value = True
Case "Casual": optStatus3.Value = True
End Select
--
HTH
Bob Phillips
(replace xxxx in the email address with gmail if mailing direct)
"VBAwannabe" wrote in message
oups.com...
Hi
I have a userform which adds/updates staff information - this has been
achieved by the fantastic resource that this forum is.
My userform has three option buttons which I can populate to the
spreadsheet by the caption of the selected option button - what I am
having trouble with is populating the optionbuttons from the
spreadsheet to the userform. I have the textboxes etc covered (from
userform to spreadsheet and spreadsheet to userform), just stumped on
the optionbuttons ...
My optionbuttons are within a frame titled; "Employment status",
permanent, temporary and ex-employee.
I had originally fixed this by removing my optionbuttons, and using a
textbox, however the optionbuttons I believe is the easiest for the
user, and limits the entries.
I can add in the code that I am using within the next 24 hours - my
spreadsheet is on my work pc.
Appreciate any assistance with this matter.
Thanx, Tania
|