Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Text Box - Initial Content

Greetings

I am using Excel 2000

I have a spread sheet with columns holding Date, Order No., Name, etc

I wish to generate a user form which will display data from a selected row,
i.e. the entry's date Order No., Name, etc in Text boxes.
This will permit the user to simultaneously review and edit the data in a
reduced error manner.

I can so far only get a text box to display the existing content of a
specific cell, eg. "C15".

How do I get it to display the data from appropriate cell of the selected row.
So far the Control Source field associated with the Text Box has rejected
all my attempts.

So far I have defined the appropriate cells as a Range.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Text Box - Initial Content

This site has a ton of useful info

http://www.contextures.com/xlUserForm01.html

"Gandalph" wrote:

Greetings

I am using Excel 2000

I have a spread sheet with columns holding Date, Order No., Name, etc

I wish to generate a user form which will display data from a selected row,
i.e. the entry's date Order No., Name, etc in Text boxes.
This will permit the user to simultaneously review and edit the data in a
reduced error manner.

I can so far only get a text box to display the existing content of a
specific cell, eg. "C15".

How do I get it to display the data from appropriate cell of the selected row.
So far the Control Source field associated with the Text Box has rejected
all my attempts.

So far I have defined the appropriate cells as a Range.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Text Box - Initial Content

Or you can try somthing like ...

Option Explicit

Private Sub TextBox1_Change()
Range("C15").Value = TextBox1.Value ' If the user Changes the data
End Sub

Private Sub UserForm_Initialize()
With Me.TextBox1 '<-- Your Textbox name
.Value = Range ("C15").Value '<--Relevant Cell Address
End With
End Sub



"Gandalph" wrote:

Greetings

I am using Excel 2000

I have a spread sheet with columns holding Date, Order No., Name, etc

I wish to generate a user form which will display data from a selected row,
i.e. the entry's date Order No., Name, etc in Text boxes.
This will permit the user to simultaneously review and edit the data in a
reduced error manner.

I can so far only get a text box to display the existing content of a
specific cell, eg. "C15".

How do I get it to display the data from appropriate cell of the selected row.
So far the Control Source field associated with the Text Box has rejected
all my attempts.

So far I have defined the appropriate cells as a Range.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Text Box - Initial Content

Thanks for the Information.
I think that you have misunderstood what I want to do.

If the active cell is in Row 22, I want the Text box to display the content
of C22, and any alteration made by the user will be reflected into C22

Or if the Active cell is in Row 54 say then I want the Text box to display
the content of C54, and any alteration made by the user will be reflected
into C54

I appologise if I am doubting your reply, but I have not had time to try it
yet - will be able to tomorrow - got to go to meeting now.


"Office_Novice" wrote:

Or you can try somthing like ...

Option Explicit

Private Sub TextBox1_Change()
Range("C15").Value = TextBox1.Value ' If the user Changes the data
End Sub

Private Sub UserForm_Initialize()
With Me.TextBox1 '<-- Your Textbox name
.Value = Range ("C15").Value '<--Relevant Cell Address
End With
End Sub



"Gandalph" wrote:

Greetings

I am using Excel 2000

I have a spread sheet with columns holding Date, Order No., Name, etc

I wish to generate a user form which will display data from a selected row,
i.e. the entry's date Order No., Name, etc in Text boxes.
This will permit the user to simultaneously review and edit the data in a
reduced error manner.

I can so far only get a text box to display the existing content of a
specific cell, eg. "C15".

How do I get it to display the data from appropriate cell of the selected row.
So far the Control Source field associated with the Text Box has rejected
all my attempts.

So far I have defined the appropriate cells as a Range.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Text Box - Initial Content

Something like this will allow a change to be made in the text box for the
active cell.
The textbox name and userform name will need to be changed to suit your needs.
Both code snippets go in the code module behind the UserForm.

Private Sub UserForm_Click()
Unload UserForm1
End Sub

Private Sub UserForm_Initialize()
Dim x As String
x = ActiveCell.Address
Me.TextBox1.ControlSource = x
Me.TextBox1.Text = Range(x).Value
End Sub


"Gandalph" wrote:

Greetings

I am using Excel 2000

I have a spread sheet with columns holding Date, Order No., Name, etc

I wish to generate a user form which will display data from a selected row,
i.e. the entry's date Order No., Name, etc in Text boxes.
This will permit the user to simultaneously review and edit the data in a
reduced error manner.

I can so far only get a text box to display the existing content of a
specific cell, eg. "C15".

How do I get it to display the data from appropriate cell of the selected row.
So far the Control Source field associated with the Text Box has rejected
all my attempts.

So far I have defined the appropriate cells as a Range.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Text Box - Initial Content

Many thanks - this did exactly what I wanted.
It also gives me ideas on how to do other things in the future.
Thanks again.

"JLGWhiz" wrote:

Something like this will allow a change to be made in the text box for the
active cell.
The textbox name and userform name will need to be changed to suit your needs.
Both code snippets go in the code module behind the UserForm.

Private Sub UserForm_Click()
Unload UserForm1
End Sub

Private Sub UserForm_Initialize()
Dim x As String
x = ActiveCell.Address
Me.TextBox1.ControlSource = x
Me.TextBox1.Text = Range(x).Value
End Sub


"Gandalph" wrote:

Greetings

I am using Excel 2000

I have a spread sheet with columns holding Date, Order No., Name, etc

I wish to generate a user form which will display data from a selected row,
i.e. the entry's date Order No., Name, etc in Text boxes.
This will permit the user to simultaneously review and edit the data in a
reduced error manner.

I can so far only get a text box to display the existing content of a
specific cell, eg. "C15".

How do I get it to display the data from appropriate cell of the selected row.
So far the Control Source field associated with the Text Box has rejected
all my attempts.

So far I have defined the appropriate cells as a Range.

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
Creating many worksheets with text from initial worksheet (and mor stacyjean622 Excel Programming 2 February 20th 08 10:24 PM
Cell content in text box in chart Munchygut Charts and Charting in Excel 2 October 12th 07 07:31 PM
Setting initial value on text box? Chet Excel Programming 2 March 20th 07 11:38 PM
Content from Text box to Cell eLaCiD Excel Programming 3 June 23rd 06 03:26 PM
Remove middle initial from "first name middle initial" Justin F. Excel Discussion (Misc queries) 15 September 26th 05 06:13 PM


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

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

About Us

"It's about Microsoft Excel"