ya I tested in your workbook, works fine
really no idea why it doesn't work after copying to mine
ya I tested in your workbook, works fine
really no idea why it doesn't work after copying to mine
o... actually I copied both version to my original file, your original version still same error, no idea why.
but your upgraded version of my one works fine.
I tried save as xlms, no difference lol
it totally works! thanks so much
I found that maybe the problem is my file is saved as xls.
The debug highlights the line: If TypeName(oCtl) = "CheckBox" And oCtl.Value = True Then
The excel I am using is 2013...if that makes any difference?
I tried to group / ungroup the checkboxes
Also try to create a new userform with only the 14checkboxes and this button
Still showing Runtime error 438, Object doesn't support this property or method.
So I think problem with this PC's setup....
Is there anyway to get my version to work? I am more familiar with this format of logic and so it will be easier for me to debug.
Many thanks.
Hi Roy,
Thanks for your reply, I try to directly copy your code but seems doesn't work, showing Object doesn't support this property or method.
Based on your code, I came up with the following which I think should work, only problem is the temp.value is showing invalid qualifier.
Private Sub CommandButton3_Click()
Dim cbcount As Integer
Dim temp As String
Dim str As String
For cbcount = 1 To 14
temp = "CheckBox" & cbcount
If temp.Value = True Then
If Len(str) = 0 Then
str = temp.Caption
Else: str = list & ", " & temp.Caption
End If
End If
Next cbcount
MsgBox str
End Sub
Display More
Hi Roy,
As this is work PC, I cannot perform any file uploading.
Understood that example file would be better, I will try to find somewhere where I can do so.
Hi all,
I setup a useform for users to input different data which will ultimately be emailed to a pre-defined email address.
While I know how to organize the data and send the e mail, I got 2 issues I am trying to resolve.
1) Checkboxes
I have a 11 checkboxes in a group, namely cb1 to cb11 with different caption.
I was wandering if anyone can teach me how I can generate a list of the ticked checkboxes caption.
i.e. If cb1 and cb5 is ticked, then the list will be the caption of only cb1 and cb5.
2)
From the userform, I have 10 fields that I wish to be taken out, put into an excel with pre-defined headers and a pre-written macro. And send this excel as an attachment to pre-defined email.
(can this be done without using a temp file?)
Thank you for your help in advance.