Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default View Row Data in UserForm / Edit

I have an UserForm which staff uses to initiate entries on a
WorkSheet. I now need to activate that same UserForm and populate the
fields with data from a selected row, so staff can edit enties.

If I click on a Cell in a row of data, how do I:

1. Capture the row number for use in the formula - say R is Rows
UserForm.ADate.Value = Worksheets("Contacts").Cells(R,2).Value

2. Load the UserForm with that data from the selected Row.

That's enough for now. Appreciate any directions.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default View Row Data in UserForm / Edit

Pete,

Private Sub UserForm_Initialize()
TextBox1.ControlSource = "$A$" & ActiveCell.Row
TextBox2.ControlSource = "$B$" & ActiveCell.Row
End Sub

will tie the Textbox1 to cell A and row. Now any changes to the text box
will input directly to the cell and anything that is already in the cell
will
appear in the textbox.
Complete the sub with all your objects.

Then use UserForm1.Show in your macro.

--
sb
"Pete T" wrote in message
om...
I have an UserForm which staff uses to initiate entries on a
WorkSheet. I now need to activate that same UserForm and populate the
fields with data from a selected row, so staff can edit enties.

If I click on a Cell in a row of data, how do I:

1. Capture the row number for use in the formula - say R is Rows
UserForm.ADate.Value = Worksheets("Contacts").Cells(R,2).Value

2. Load the UserForm with that data from the selected Row.

That's enough for now. Appreciate any directions.



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
multiple user in excel to edit a userform Rachel Excel Discussion (Misc queries) 2 November 25th 08 04:47 PM
Edit exsisting data with userform Geo Excel Discussion (Misc queries) 2 October 1st 07 07:38 PM
DDE - View Pane and Allow Edit SSDLUE Excel Discussion (Misc queries) 0 February 1st 07 03:56 PM
Code to edit directly in cells from userform Tom Ogilvy Excel Programming 0 September 7th 03 10:27 PM
Code to edit directly in cells from userform Harald Staff[_4_] Excel Programming 0 September 7th 03 10:09 PM


All times are GMT +1. The time now is 04: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"