Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default hyperlinks out of a combo box

This is hopfully a simple thing to do. I currently have a list of files as
choices in a combo box. I would like to be able to hyperlink out to the
appropriate file when the file is chosen in the combo box. Using the forms
combo box is a little awkward, and in my primitive way of doing things,
requires helper cells for the index and hyperlink functions. I know next to
nothing of VBA, so any help would be appreciated. I would only require an
example; hopefully, I will be able to modify whatever code is given me to
suit my needs.

wazooli
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default hyperlinks out of a combo box

Why use a hyperlink. why not just have the event code open the workbook
with the standard Workbooks.Open "C:\MyFile.xls"

--
Regards,
Tom Ogilvy

"Wazooli" wrote in message
...
This is hopfully a simple thing to do. I currently have a list of files

as
choices in a combo box. I would like to be able to hyperlink out to the
appropriate file when the file is chosen in the combo box. Using the

forms
combo box is a little awkward, and in my primitive way of doing things,
requires helper cells for the index and hyperlink functions. I know next

to
nothing of VBA, so any help would be appreciated. I would only require an
example; hopefully, I will be able to modify whatever code is given me to
suit my needs.

wazooli



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default hyperlinks out of a combo box

Thanks for the reply, and good question. Straight up answer: I didn't know
I could use Workbooks.Open "C:\MyFile.xls". Like I said, I know nothing
about VBA. Thanks for the suggestion. The only other question I have is how
do I translate the choice made in the combo box into what you suggested?

Wazooli

"Tom Ogilvy" wrote:

Why use a hyperlink. why not just have the event code open the workbook
with the standard Workbooks.Open "C:\MyFile.xls"

--
Regards,
Tom Ogilvy

"Wazooli" wrote in message
...
This is hopfully a simple thing to do. I currently have a list of files

as
choices in a combo box. I would like to be able to hyperlink out to the
appropriate file when the file is chosen in the combo box. Using the

forms
combo box is a little awkward, and in my primitive way of doing things,
requires helper cells for the index and hyperlink functions. I know next

to
nothing of VBA, so any help would be appreciated. I would only require an
example; hopefully, I will be able to modify whatever code is given me to
suit my needs.

wazooli




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default hyperlinks out of a combo box

a dropdown box from the forms toolbar

Sub Drpdwn_Click()
sname = Application.Caller
With Activesheet.DropDowns(sName)
sFile = .List(.ListIndex)
End With
if dir("C:\MyFiles\" & sfile) < "" then
workbooks.Open "C:\MyFiles\" & sFile
else
msgbox "Bad File name"
end if
End Sub

Assign this macro to the dropdown. Assumes the dropdown contains filenames
and all file choices are in a single directory.

--------------

a combobox from the control toolbox toolbar.


Private Sub Combobox1_Click()
if dir ("C:\MyFiles\" & Combobox1.Value) < "" then
workbooks.Open "C:\Myfiles\" & Combobox1.Value
else
msgbox "File does not exist"
End if
End Sub

It depends on what is in the combobox. I am assuming it has somthing like
MyFile.xls in the dropdown and all files are in the same directory.



http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.
http://j-walk.com/ss/excel/tips/tip84.htm

http://support.microsoft.com/default...b;en-us;829070
How to use Visual Basic for Applications examples to control UserForms in
Microsoft Excel


http://support.microsoft.com/?id=168067
File Title: Microsoft(R) Visual Basic(R) for Applications Examples for
Controlling UserForms in Microsoft Excel 97
File Name: WE1163.EXE
File Size: 161742 bytes
File Date: 05/08/97
Keywords: kbfile
Description: This Application Note is an introduction to manipulating
UserForms in Microsoft Excel 97. It includes examples and Microsoft Visual
Basic for Applications macros that show you how to take advantage of the
capabilities of UserForms and use each of the ActiveX controls that are
available for UserForms

Peter Aiken Articles:
Part I
http://msdn.microsoft.com/library/en...FormsPartI.asp
Part II
http://msdn.microsoft.com/library/en...ormsPartII.asp



"Wazooli" wrote in message
...
Thanks for the reply, and good question. Straight up answer: I didn't

know
I could use Workbooks.Open "C:\MyFile.xls". Like I said, I know nothing
about VBA. Thanks for the suggestion. The only other question I have is

how
do I translate the choice made in the combo box into what you suggested?

Wazooli

"Tom Ogilvy" wrote:

Why use a hyperlink. why not just have the event code open the workbook
with the standard Workbooks.Open "C:\MyFile.xls"

--
Regards,
Tom Ogilvy

"Wazooli" wrote in message
...
This is hopfully a simple thing to do. I currently have a list of

files
as
choices in a combo box. I would like to be able to hyperlink out to

the
appropriate file when the file is chosen in the combo box. Using the

forms
combo box is a little awkward, and in my primitive way of doing

things,
requires helper cells for the index and hyperlink functions. I know

next
to
nothing of VBA, so any help would be appreciated. I would only

require an
example; hopefully, I will be able to modify whatever code is given me

to
suit my needs.

wazooli






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default hyperlinks out of a combo box

Wow. Thanks so much for the quick fix (hopefully), as well as the online
resources.

Wazooli

"Tom Ogilvy" wrote:

a dropdown box from the forms toolbar

Sub Drpdwn_Click()
sname = Application.Caller
With Activesheet.DropDowns(sName)
sFile = .List(.ListIndex)
End With
if dir("C:\MyFiles\" & sfile) < "" then
workbooks.Open "C:\MyFiles\" & sFile
else
msgbox "Bad File name"
end if
End Sub

Assign this macro to the dropdown. Assumes the dropdown contains filenames
and all file choices are in a single directory.

--------------

a combobox from the control toolbox toolbar.


Private Sub Combobox1_Click()
if dir ("C:\MyFiles\" & Combobox1.Value) < "" then
workbooks.Open "C:\Myfiles\" & Combobox1.Value
else
msgbox "File does not exist"
End if
End Sub

It depends on what is in the combobox. I am assuming it has somthing like
MyFile.xls in the dropdown and all files are in the same directory.



http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.
http://j-walk.com/ss/excel/tips/tip84.htm

http://support.microsoft.com/default...b;en-us;829070
How to use Visual Basic for Applications examples to control UserForms in
Microsoft Excel


http://support.microsoft.com/?id=168067
File Title: Microsoft(R) Visual Basic(R) for Applications Examples for
Controlling UserForms in Microsoft Excel 97
File Name: WE1163.EXE
File Size: 161742 bytes
File Date: 05/08/97
Keywords: kbfile
Description: This Application Note is an introduction to manipulating
UserForms in Microsoft Excel 97. It includes examples and Microsoft Visual
Basic for Applications macros that show you how to take advantage of the
capabilities of UserForms and use each of the ActiveX controls that are
available for UserForms

Peter Aiken Articles:
Part I
http://msdn.microsoft.com/library/en...FormsPartI.asp
Part II
http://msdn.microsoft.com/library/en...ormsPartII.asp



"Wazooli" wrote in message
...
Thanks for the reply, and good question. Straight up answer: I didn't

know
I could use Workbooks.Open "C:\MyFile.xls". Like I said, I know nothing
about VBA. Thanks for the suggestion. The only other question I have is

how
do I translate the choice made in the combo box into what you suggested?

Wazooli

"Tom Ogilvy" wrote:

Why use a hyperlink. why not just have the event code open the workbook
with the standard Workbooks.Open "C:\MyFile.xls"

--
Regards,
Tom Ogilvy

"Wazooli" wrote in message
...
This is hopfully a simple thing to do. I currently have a list of

files
as
choices in a combo box. I would like to be able to hyperlink out to

the
appropriate file when the file is chosen in the combo box. Using the
forms
combo box is a little awkward, and in my primitive way of doing

things,
requires helper cells for the index and hyperlink functions. I know

next
to
nothing of VBA, so any help would be appreciated. I would only

require an
example; hopefully, I will be able to modify whatever code is given me

to
suit my needs.

wazooli








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default hyperlinks out of a combo box

and, P.S. - the second snippet of code works fantastically. thanks again.

wazooli

"Tom Ogilvy" wrote:

a dropdown box from the forms toolbar

Sub Drpdwn_Click()
sname = Application.Caller
With Activesheet.DropDowns(sName)
sFile = .List(.ListIndex)
End With
if dir("C:\MyFiles\" & sfile) < "" then
workbooks.Open "C:\MyFiles\" & sFile
else
msgbox "Bad File name"
end if
End Sub

Assign this macro to the dropdown. Assumes the dropdown contains filenames
and all file choices are in a single directory.

--------------

a combobox from the control toolbox toolbar.


Private Sub Combobox1_Click()
if dir ("C:\MyFiles\" & Combobox1.Value) < "" then
workbooks.Open "C:\Myfiles\" & Combobox1.Value
else
msgbox "File does not exist"
End if
End Sub

It depends on what is in the combobox. I am assuming it has somthing like
MyFile.xls in the dropdown and all files are in the same directory.



http://support.microsoft.com/default.aspx?kbid=213749
XL2000: How to Use a UserForm for Entering Data

http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form
Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step.
http://j-walk.com/ss/excel/tips/tip84.htm

http://support.microsoft.com/default...b;en-us;829070
How to use Visual Basic for Applications examples to control UserForms in
Microsoft Excel


http://support.microsoft.com/?id=168067
File Title: Microsoft(R) Visual Basic(R) for Applications Examples for
Controlling UserForms in Microsoft Excel 97
File Name: WE1163.EXE
File Size: 161742 bytes
File Date: 05/08/97
Keywords: kbfile
Description: This Application Note is an introduction to manipulating
UserForms in Microsoft Excel 97. It includes examples and Microsoft Visual
Basic for Applications macros that show you how to take advantage of the
capabilities of UserForms and use each of the ActiveX controls that are
available for UserForms

Peter Aiken Articles:
Part I
http://msdn.microsoft.com/library/en...FormsPartI.asp
Part II
http://msdn.microsoft.com/library/en...ormsPartII.asp



"Wazooli" wrote in message
...
Thanks for the reply, and good question. Straight up answer: I didn't

know
I could use Workbooks.Open "C:\MyFile.xls". Like I said, I know nothing
about VBA. Thanks for the suggestion. The only other question I have is

how
do I translate the choice made in the combo box into what you suggested?

Wazooli

"Tom Ogilvy" wrote:

Why use a hyperlink. why not just have the event code open the workbook
with the standard Workbooks.Open "C:\MyFile.xls"

--
Regards,
Tom Ogilvy

"Wazooli" wrote in message
...
This is hopfully a simple thing to do. I currently have a list of

files
as
choices in a combo box. I would like to be able to hyperlink out to

the
appropriate file when the file is chosen in the combo box. Using the
forms
combo box is a little awkward, and in my primitive way of doing

things,
requires helper cells for the index and hyperlink functions. I know

next
to
nothing of VBA, so any help would be appreciated. I would only

require an
example; hopefully, I will be able to modify whatever code is given me

to
suit my needs.

wazooli






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
How do I create a combo box of hyperlinks? Laura Jordan Excel Worksheet Functions 2 November 7th 08 09:35 PM
Update 2000 Excel hyperlinks to 2003 hyperlinks lonv155 Excel Worksheet Functions 4 October 25th 07 05:51 AM
Create a list box/combo box with hyperlinks Jared Excel Worksheet Functions 0 August 29th 06 07:46 PM
validation list or combo boxes with hyperlinks georana Excel Discussion (Misc queries) 2 April 17th 06 01:32 PM
Combo box with data to use as hyperlinks Dannycol Excel Worksheet Functions 0 April 10th 06 05:21 PM


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

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

About Us

"It's about Microsoft Excel"