I am looking to have a userform textbox value linked to a cell. I would like to act as default, being able to be changed by the user should they desire. I will then take the data and put it to a database.
There are a lot of threads on this, but I have been unsuccessful in applying them to my application so far.
When the userform is loaded, I would like the textbox to have the value loaded.
here is where I'm at....
sub load_test_form()
load test_form
end sub
private sub Userform_Initialize()
Dim txt_test as string
dim celval as string
celval = sheets("Sheet1").range("M17".value
txt_test.text = celval
End sub
I get an invalid qualifier error and I'm sure where I went wrong. Any ideas? seems simple... I can get it to work for labels, just not textboxs.
There are a lot of threads on this, but I have been unsuccessful in applying them to my application so far.
When the userform is loaded, I would like the textbox to have the value loaded.
here is where I'm at....
sub load_test_form()
load test_form
end sub
private sub Userform_Initialize()
Dim txt_test as string
dim celval as string
celval = sheets("Sheet1").range("M17".value
txt_test.text = celval
End sub
I get an invalid qualifier error and I'm sure where I went wrong. Any ideas? seems simple... I can get it to work for labels, just not textboxs.