![]() |
Returning value in VB editor
Hi, I would greatly appreciate some help on my problem. I have set up a combo box in a spreadsheet where the user selects country from the dropdown list. I then want to insert the countr selected into the pathname of the file to be opened . . . Workbooks.Open Filename:= _ "S:\AHCA Report 04-05\country.xls" How do I get Cheer -- quinellu ----------------------------------------------------------------------- quinellus's Profile: http://www.excelforum.com/member.php...fo&userid=2819 View this thread: http://www.excelforum.com/showthread.php?threadid=47740 |
Returning value in VB editor
Workbooks.Open Filename:= "S:\AHCA Report 04-05\" & <value from dropdown & ".xls"
-- Regards; Rob ------------------------------------------------------------------------ "quinellus" wrote in message ... Hi, I would greatly appreciate some help on my problem. I have set up a combo box in a spreadsheet where the user selects a country from the dropdown list. I then want to insert the country selected into the pathname of the file to be opened . . . Workbooks.Open Filename:= _ "S:\AHCA Report 04-05\country.xls" How do I get Cheers -- quinellus ------------------------------------------------------------------------ quinellus's Profile: http://www.excelforum.com/member.php...o&userid=28198 View this thread: http://www.excelforum.com/showthread...hreadid=477403 |
Returning value in VB editor
Hi Rob, Thanks for your reply. Unfortunately I am still having problems because the result from the dropdown list is still not being picked up. I have attached the workbook and would appreciate if you could give it a quick look as I have been racking my little brain for a few hour over it. Regards, Michael -- quinellus ------------------------------------------------------------------------ quinellus's Profile: http://www.excelforum.com/member.php...o&userid=28198 View this thread: http://www.excelforum.com/showthread...hreadid=477403 |
Returning value in VB editor
Here's the attachment . +------------------------------------------------------------------- |Filename: Help.zip |Download: http://www.excelforum.com/attachment.php?postid=3919 +------------------------------------------------------------------- -- quinellu ----------------------------------------------------------------------- quinellus's Profile: http://www.excelforum.com/member.php...fo&userid=2819 View this thread: http://www.excelforum.com/showthread.php?threadid=47740 |
Returning value in VB editor
Sorry about not getting back sooner (OE problems).
Unfortunately I-as with a number of others-will not download workbooks from unknown sources (it's a sad world). I missed the point on your original post-thought you were asking how to concatenate the value vs. the value not being present. Maybe you could post some code and someone should be able to assist you. -- Regards; Rob ------------------------------------------------------------------------ "quinellus" wrote in message ... Here's the attachment . . +-------------------------------------------------------------------+ |Filename: Help.zip | |Download: http://www.excelforum.com/attachment.php?postid=3919 | +-------------------------------------------------------------------+ -- quinellus ------------------------------------------------------------------------ quinellus's Profile: http://www.excelforum.com/member.php...o&userid=28198 View this thread: http://www.excelforum.com/showthread...hreadid=477403 |
Returning value in VB editor
my suggestion is to set this combobox's cell link to any cell (a hidden one, if neccessary) and reference that cell for the value in your path, like this: Dim path as String Dim ws as Worksheet set ws = ThisWorkbook.Worksheets("Sheet1") path = "S:\AHCA Report 04-05\" & ws.Range("$B$12") & ".xls" -- medicenpringles ------------------------------------------------------------------------ medicenpringles's Profile: http://www.excelforum.com/member.php...o&userid=16458 View this thread: http://www.excelforum.com/showthread...hreadid=477403 |
All times are GMT +1. The time now is 10:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com