Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help with userform

i have created a userform that has 10 text boxes, is it possible to get
these text boxese to read information from 10 cells, so that the
information from the cells will become the contents of the text box.

any help would be appreciated, thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Help with userform

Hi Mike,

Try something like:

Me.TextBox1.Text = Range("A1").Value


---
Regards,
Norman


"Mike Grant" wrote in message
ups.com...
i have created a userform that has 10 text boxes, is it possible to get
these text boxese to read information from 10 cells, so that the
information from the cells will become the contents of the text box.

any help would be appreciated, thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help with userform

the help is much appreciated, but i get an error saying, "compile
Error: invalid use of the Me keyword

i'm fairly puzzled.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Help with userform

You can use the command:
for example for the range "A1:A10"
Dim i As Single

For i = 1 To 10
Me.Controls("TextBox" & i).Value = Cells(i, 1).Value
Next i

with regards Steven

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Help with userform

Hi Mike,

Did you put the code in the Userform's code module?

As an exanple, the following worked for me:

'===========
Private Sub UserForm_Initialize()
Me.TextBox1.Text = Range("A1").Value
End Sub
'<<===========


---
Regards,
Norman


"Mike Grant" wrote in message
oups.com...
the help is much appreciated, but i get an error saying, "compile
Error: invalid use of the Me keyword

i'm fairly puzzled.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help with userform

Thank you both for your hasty replies,

Svhell: your method was a bit OTT for what i was looking for. but i
still want to say a hug thank you to you, as you replied quickly.

Norman: i used your method as you stated in the second post, and this
gave me the correct result. and i would also like to thank you for the
hasty reply.

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
Userform to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM
Access from add_in userform to main template userform.... Ajit Excel Programming 1 November 18th 04 05:15 PM
Linking userform to userform in Excel 2003 missmelis01 Excel Programming 2 August 27th 04 08:07 PM


All times are GMT +1. The time now is 01:14 PM.

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"