Hi,
I am having trouble on finding a solution on how to create a textbox when a checkbox is checked.
Here is my code:
On Sheet Browse:
Code
With ActiveSheet.TextBoxes.Add(Cells(i + 1, 5).Left, Cells(i + 1, 5).Top, Cells(i + 1, 5).Width, Cells(i + 1, 5).Height)
.Name = "Textbox_" & i
.Visible = False
End With
On Sheet Generate:
Code
'check if the current cell has data in it
If Cells(i + 1, 3) <> "" Then
'checkbox validation
For Each chk In ActiveSheet.CheckBoxes
If chk.Value = True Then
With ActiveSheet.TextBoxes.Visible = True
End With
If Textbox_i = vbNullString Then
'write the data to the file
item = item & "@" & Me.Server.Value & Cells(i + 1, 3) & ";" & Chr(10)
End If
Else
item2 = item & "@" & Cells(i + 1, 3) & Chr(10)
End If
i = i + 1
Next
Else
'if the last row has been reached exit the loop
flag = False
End If
Display More
When I tried running the code the result is:
[ATTACH=CONFIG]69988[/ATTACH]
The Textbox is not created nor the visible is True. (Sequence Column).
Any help is appreciated!
Thanks!
Mot