Passing variable values to userform control

  • Thread starter Thread starter KJ-clueless
  • Start date Start date
K

KJ-clueless

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?
 
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)
 
Back
Top