PC Review


Reply
Thread Tools Rate Thread

Combo Box Dropdown Menu

 
 
=?Utf-8?B?UlNIRg==?=
Guest
Posts: n/a
 
      5th Jan 2007
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 With Quote
 
 
 
 
=?Utf-8?B?QWxvaw==?=
Guest
Posts: n/a
 
      5th Jan 2007
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 With Quote
 
NickHK
Guest
Posts: n/a
 
      5th Jan 2007
If they are not Excel file, you could use:
ThisWorkbook.FollowHyperlink combo1.text

NickHK

"RSHF" <(E-Mail Removed)> wrote in message
news:F779039E-A6B0-4FCE-9057-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?QWxvaw==?=
Guest
Posts: n/a
 
      6th Jan 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
select From dropdown and return another dropdown menu RE4379 Microsoft Excel Misc 2 11th Mar 2010 03:09 PM
Dropdown combo values dependent on another combo =?Utf-8?B?Q1c=?= Microsoft Access 3 3rd Feb 2007 03:02 PM
create dropdown menu using Combo box =?Utf-8?B?QW50aG9ueQ==?= Microsoft Excel Worksheet Functions 1 29th Jan 2005 06:15 PM
Is there a way to embed a dropdown combo box into a menu or toolbar? Tom Jones Microsoft Dot NET Framework Forms 2 20th Aug 2004 02:36 PM
problem adding button to an EXISTING dropdown menu on a Worksheet Menu Bar Karen P Microsoft Excel Worksheet Functions 3 29th Oct 2003 12:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:45 PM.