Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default Combo Box Dropdown Menu

The code to open the selected file becomes

Workbooks.open FileName:=cboSelectedFile.List(,1) & cboSelectedFile.List(,0)
(You might have got confused because I had earlier used cboSelectedFile as
the name of the combobox and later used the name ComboBox1. Sorry for that.)

So you put this piece of code whereever you want to open the file. If you
want to open the file when a user clicks on a button then you put this in the
button's click event. Yoou could also put this code in the combobox's click
event. If you do this then everytime a user click and selects an entry from
the Combobox the corresponding file will open. Hence it all depends on the
design of your application.

Alok

"RSHF" wrote:

Alok,
I understand the first part of your instructions but, where do I input
ComboBox1.List(,1) & ComboBox1.List(,0)

Where does that go in relation to this, Workbooks.open
FileName:=cboSelectedFile, in the button's click event?

As you can tell, I am still an amateuer!!

"Alok" wrote:

Yes if you want the file locations(paths or folders) to be hidden from the
user you can do that by having the next column list them. When setting the
ListFillRange of the combo box you will include this column. Set the number
of columns property of the combo box to 2 and set the width of the second
column to 0 so that it does not show up. (;0 pt)
Then you can create the full file name by
ComboBox1.List(,1) & ComboBox1.List(,0)
this assumes that the path name includes the "\" at the end.


"RSHF" wrote:

Ok, I presume the first step I need to take would be to link the real file
version, to the corresponding entry on the drop down box then. In other
words, on my current sheet the drop down box just lists the names of the
files. I have the files listed as an array which only displays their names.
How do I attach their file loccation without having that shown in the drop
down menu, so that users can scroll through the drop down and select the file
they choose and then use the command button to open that file?


"Alok" wrote:

If the combo box is called cboSelectedFile then
add the following code in the button's click event

Workbooks.open FileName:=cboSelectedFile


"RSHF" wrote:

I have a combo box on a master sheet that lists an alphabetical menu of files
for users to open. How do I attach hyperlinks to these files in the dropdown
menu, so that users may scroll through the menu pick the file they want and
then press a command button to open up the chosen file from the master sheet.
The drop down menu also functions as a link to a seperate database so I may
have to combine the code. Any suggestions?

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
select From dropdown and return another dropdown menu RE4379 Excel Discussion (Misc queries) 2 March 11th 10 03:09 PM
filter dropdown menu so 2nd drop menu is customized menugal Excel Worksheet Functions 1 September 4th 07 05:25 PM
Combo Box Dropdown Menu NickHK Excel Programming 0 January 5th 07 06:23 AM
Create Dropdown menu without using the Validation on the Data Menu lostinformulas Excel Worksheet Functions 0 July 13th 06 08:47 PM
create dropdown menu using Combo box Anthony Excel Worksheet Functions 1 January 29th 05 06:15 PM


All times are GMT +1. The time now is 05:04 AM.

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

About Us

"It's about Microsoft Excel"