![]() |
Extracting Text to Separate Textboxes
I have a userform where users input their name, department, phone#, fax# and
email. This information is input into one cell on a worksheet. The cell is formatted using chr(10) between each. I want to be able to edit the user information by breaking it back out of the cell an into a userform with 5 textboxes. The text length varies by user. Is there a way to accomplish this in VBA? |
Extracting Text to Separate Textboxes
Dim res as Variant
res=Split(Range("A1"),chr(10)) tbName.value=res(0) tbDept.Value=res(1) .... HTH -- AP "Nausett" a écrit dans le message de news: ... I have a userform where users input their name, department, phone#, fax# and email. This information is input into one cell on a worksheet. The cell is formatted using chr(10) between each. I want to be able to edit the user information by breaking it back out of the cell an into a userform with 5 textboxes. The text length varies by user. Is there a way to accomplish this in VBA? |
Extracting Text to Separate Textboxes
Thank you. That worked perfectly.
"Ardus Petus" wrote: Dim res as Variant res=Split(Range("A1"),chr(10)) tbName.value=res(0) tbDept.Value=res(1) .... HTH -- AP "Nausett" a écrit dans le message de news: ... I have a userform where users input their name, department, phone#, fax# and email. This information is input into one cell on a worksheet. The cell is formatted using chr(10) between each. I want to be able to edit the user information by breaking it back out of the cell an into a userform with 5 textboxes. The text length varies by user. Is there a way to accomplish this in VBA? |
All times are GMT +1. The time now is 03:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com