Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default 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?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import into Access from Excel, passing a variable for the field... [email protected] Excel Worksheet Functions 1 April 12th 07 09:44 AM
Userform and variable Jeff Excel Discussion (Misc queries) 1 March 16th 07 03:14 PM
Passing string as array variable (Pivot VBA) klingongardener Excel Discussion (Misc queries) 2 December 23rd 06 07:58 PM
Passing Variable Number of Arguments to a Sub blatham Excel Discussion (Misc queries) 4 December 10th 05 10:36 AM
Passing Variable to LINEST RW Excel Worksheet Functions 5 May 24th 05 07:00 PM


All times are GMT +1. The time now is 08:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"