Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Prefill a text box on a form

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 180
Default Prefill a text box on a form

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.
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Mike H." wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Prefill a text box on a form

The cell has numbers in it. Should it prefill with numbers okay or do I need
to convert to text via the str() function?

"Pranav Vaidya" wrote:

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.
--
Pranav Vaidya
VBA Developer
PN, MH-India
If you think my answer is useful, please rate this post as an ANSWER!!


"Mike H." wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell validation prefill Sue Excel Discussion (Misc queries) 2 April 9th 08 09:24 PM
Automatic cell validation prefill by entering first letter JB Excel Discussion (Misc queries) 4 April 11th 07 06:48 PM
How can I prefill a text field with leading 0s? Sweetetc Excel Worksheet Functions 4 February 24th 06 07:04 PM
converting numbers to text and prefill text field with 0's Jan Buckley Excel Discussion (Misc queries) 2 January 20th 05 09:03 PM
How do I convert dollars and cents to text, and prefill the cell . Jan Buckley Excel Worksheet Functions 1 January 20th 05 07:22 PM


All times are GMT +1. The time now is 04:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"