Hello All,<o></o>
I have a userform setting in my worksheet. I added a few textbox on it. After that I get this error message “Run Timeerror 1004 application-define or object-defined error”. I clicked the debugger and this what came outand it highlighted the error “sht.Range(headerArr(a* 2)) = Controls("TextBox" & (a + 1))”<o></o>
This is the code that I have on my commandbutton:
Private Sub cmdOK_Click()
headerArr = Split(header, ",")
Set sht = Worksheets(mySheet)
For a = 0 To (UBound(headerArr) - 1) / 2
sht.Range(headerArr(a * 2)) = Controls("TextBox" & (a + 1))
Next
End Sub
thank you.
I have a userform setting in my worksheet. I added a few textbox on it. After that I get this error message “Run Timeerror 1004 application-define or object-defined error”. I clicked the debugger and this what came outand it highlighted the error “sht.Range(headerArr(a* 2)) = Controls("TextBox" & (a + 1))”<o></o>
This is the code that I have on my commandbutton:
Private Sub cmdOK_Click()
headerArr = Split(header, ",")
Set sht = Worksheets(mySheet)
For a = 0 To (UBound(headerArr) - 1) / 2
sht.Range(headerArr(a * 2)) = Controls("TextBox" & (a + 1))
Next
End Sub
thank you.