ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   cell ranges to userforms (https://www.excelbanter.com/excel-programming/339810-cell-ranges-userforms.html)

triaz

cell ranges to userforms
 

I have a userform that contains 12 textfields. The user enters their
information into the the userform which then adds this to the worksheet
(prevents user from inputting directly into cells).

I have been trying to get the userform to read these values from the
worksheet and display them in the textfields contained in the form so
that when a user wants to edit info they don't have to fill in the
fields repeatedly. This is proving to be a problem.

I hope that explanation was clear enough.

Thanks in advance for any help offered


--
triaz
------------------------------------------------------------------------
triaz's Profile: http://www.excelforum.com/member.php...o&userid=27180
View this thread: http://www.excelforum.com/showthread...hreadid=466821


Tom Ogilvy

cell ranges to userforms
 
Sub ABC()
for each cell in ActiveCell.Resize(1,12)
userform1.Controls("Textbox" & i).Value = cell.Value
Next
End Sub

would be a general approach.

--
Regards,
Tom Ogilvy


"triaz" wrote in
message ...

I have a userform that contains 12 textfields. The user enters their
information into the the userform which then adds this to the worksheet
(prevents user from inputting directly into cells).

I have been trying to get the userform to read these values from the
worksheet and display them in the textfields contained in the form so
that when a user wants to edit info they don't have to fill in the
fields repeatedly. This is proving to be a problem.

I hope that explanation was clear enough.

Thanks in advance for any help offered


--
triaz
------------------------------------------------------------------------
triaz's Profile:

http://www.excelforum.com/member.php...o&userid=27180
View this thread: http://www.excelforum.com/showthread...hreadid=466821





All times are GMT +1. The time now is 03:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com