![]() |
Passing variable values to userform control
I am running some code to loop through files. I want to pass the file name
being examined to a textbox on a userform. I am not familiar with referencing these objects in Excel VBA.. rather easy but different in Access. Can any one help? I would do it this way in Access: forms!frm_whatever!txtbox1.value = varname how do I do this in Excel? |
Passing variable values to userform control
In the form launch macro, use
With Userform1 .TextBox1.Text = ActiveWorkbook.name .Show End With -- --- HTH Bob __________________________________________ UK Cambridge XL Users Conference 29-30 Nov http://www.exceluserconference.com/UKEUC.html (there's no email, no snail mail, but somewhere should be gmail in my addy) "KJ-clueless" wrote in message ... I am running some code to loop through files. I want to pass the file name being examined to a textbox on a userform. I am not familiar with referencing these objects in Excel VBA.. rather easy but different in Access. Can any one help? I would do it this way in Access: forms!frm_whatever!txtbox1.value = varname how do I do this in Excel? |
Passing variable values to userform control
Thanks for the help. Got me going in the right direction.
"Bob Phillips" wrote: In the form launch macro, use With Userform1 .TextBox1.Text = ActiveWorkbook.name .Show End With -- --- HTH Bob __________________________________________ UK Cambridge XL Users Conference 29-30 Nov http://www.exceluserconference.com/UKEUC.html (there's no email, no snail mail, but somewhere should be gmail in my addy) "KJ-clueless" wrote in message ... I am running some code to loop through files. I want to pass the file name being examined to a textbox on a userform. I am not familiar with referencing these objects in Excel VBA.. rather easy but different in Access. Can any one help? I would do it this way in Access: forms!frm_whatever!txtbox1.value = varname how do I do this in Excel? |
All times are GMT +1. The time now is 11:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com