-
open worksheet
Hello all,
New to this site, so here is my problem.
I have populated a listbox on a form, from a folder on my desktop. the folder contains .xls files.
I am then trying to open a selected file from that list box.
here is what i have done so far,
dim pathaname
dim run
pathname=("excel.exe" & txtfilename.text & listbox1.value)
'txtfilename.text is where the user types in the address of the folder that wil populate the listbox.
run = shell (pathname, [vbnormalfocus]
when i run this it tells me file not found. although the address is correct in the pathname but when i hover the curser over run it states run=empty.
please help. i have been at this way too long.
-
If the workbooks are all in the same place as the folder on your desktop ...[VBA]Workbooks.Open (ActiveWorkbook.Path & "\" & Me.Listbox1.Value)[/VBA]Charlize
-
thanks
you are a legend,
if you were here id kiss ya.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules