Hi all!!
I need a code in Excel vba to open a folder, select a file from that folder and assign that file to a variable (obj1 As Object type)
Please help!!
Thanks in Advance![]()
![]()
Hi all!!
I need a code in Excel vba to open a folder, select a file from that folder and assign that file to a variable (obj1 As Object type)
Please help!!
Thanks in Advance![]()
![]()
Last edited by pratyu; 06-22-2012 at 02:52 AM.
Try this,
![]()
Please Login or Register to view this content.
Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
I am the real 'Napster'
The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...
If you receive help please give thanks. Click the * in the bottom left hand corner.
snb's VBA Help Files
To expand a little on Dave's suggestion:
![]()
Please Login or Register to view this content.
Thanks to Dave & Kyle for the quick replies.
But, I have a different problem...
The code should give an option to SELECT ANY file from a folder and assign it to a variable of Object type....
Sorry for the ambiguity in my thread.!
Please help!
Maybe the msoFilepicker,
![]()
Please Login or Register to view this content.
Hi Dave!!
This code is working but somehow the files aren't shown in the folder!!
Any other thing to be added?
Try this
![]()
Please Login or Register to view this content.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
I've mistyped the file extension name...
I've corrected that and it worked...!! Thanks a lot!!![]()
Thanks a lot royUK... it worked!!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks