Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi All, Just wanted to know the code for inserting 3-4 cells values on a excel sheet into a single text box on a userform. I think it might be the offset property not sure. E.g Range A1-D1 need the contents of all those to go into a single text box which is created on a userform. These will automatically be added to the text box when you press a commandbutton on the excel sheet help? regards -- VBA_MAN ------------------------------------------------------------------------ VBA_MAN's Profile: http://www.excelforum.com/member.php...o&userid=32437 View this thread: http://www.excelforum.com/showthread...hreadid=522106 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You dont need to use the offset but this is the simpliest way.
Dim rngmyrange As Range 'Change the sheet name to the relevant sheet Set rngmyrange = ActiveWorkbook.Sheets("Sheet1").Range("A1") 'change dialogsheets(1).editboxes(1) to represent your userform and text box names... DialogSheets(1).EditBoxes(1).Text = ngmyrange.Offset(0, 0) & rngmyrange.Offset(0, 1) & rngmyrange.Offset(0, 2) & rngmyrange.Offset(0, 3) ' you might want to add in some spaces or commas .. 'ngmyrange.Offset(0, 0) & ", " & rngmyrange.Offset(0, 1) etc... |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Slight typo...
Dim rngmyrange As Range 'Change the sheet name to the relevant sheet Set rngMyRange = ActiveWorkbook.Sheets("Sheet1").Range("A1") 'change dialogsheets(1).editboxes(1) to represent your userform and text box names... DialogSheets(1).EditBoxes(1).Text = rngMyRange.Offset(0, 0) & rngMyRange.Offset(0, 1) & rngMyRange.Offset(0, 2) & rngMyRange.Offset(0, 3) ' you might want to add in some spaces or commas .. 'rngMyRange.Offset(0, 0) & ", " & rngMyRange.Offset(0, 1) etc... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VLookup multiple values - sum returned values into single cell | Excel Worksheet Functions | |||
Multiple returned values into a single cell | Excel Discussion (Misc queries) | |||
Indentify value from multiple values in a single cell | Excel Worksheet Functions | |||
How to sum the values of a single cell from multiple worksheets | Excel Worksheet Functions | |||
Toggle multiple values in single cell | Excel Worksheet Functions |