Prefill a text box on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to prefill a textbox with data from the excel file and I do not want
the user to be able to change the data in this box. How do i do this?
 
Here's what you need to do.

Assume that the data you want to use to pre-fill the text box is in cell A2

Textbox1.Text=Range("A2").Value

Secondly, set the 'Locked' or 'Enabled' property of the text box to TRUE.
 
The cell has numbers in it. Should it prefill with numbers okay or do I need
to convert to text via the str() function?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top