Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default can you link a hyperlink to a macro?


Hi all.
I am doing a project for my final year of my degree and it was really
only feasible using some already installed software so i thought to use
MS excel and vba as the frontend and backend.

I have set of columns that is basically "day of the month". Each column
has a heading such as 12-Sep
I want to link each cell to a function but the only way i can think of
where cell values change from month to month is to make each heading
cell a hyperlink.
Is this possible or is there another (not too adv ;) ) way to do it?
thanks.


--
norman1nz
------------------------------------------------------------------------
norman1nz's Profile: http://www.excelforum.com/member.php...o&userid=27155
View this thread: http://www.excelforum.com/showthread...hreadid=466678

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default can you link a hyperlink to a macro?

You might try using Labels and setting their properties to move with the
cell. That way it looks text in a cell but is really floating over the top.
It'll look better if you turn-off the gridlines option. You can change the
text of a label using the Label.Caption property. You could then have to have
a procedure that changes the caption of the label from day to day?

public sub updateLabels()
'Assuming that your label is named label1.
label1.caption = Format(now(), "dddd, mmm d yyyy")
end sub


If I was doing this it'd use the "Visual Basic" toolbar not the "Forms" bar.
This toolbar contains a "properties" button that lets you see and set the
name, caption and font of a label more easily. Fianlly you can run whatever
macro you want on the labels click event:

private sub Label1_Click()
..
..
..
end sub
(just double click on your label and complete the sub)

If you add the label in design mode it'll be more difficult for users to
accidentally change the label when they're clciking on it to run your macro.

good luck

Rm


"norman1nz" wrote:


Hi all.
I am doing a project for my final year of my degree and it was really
only feasible using some already installed software so i thought to use
MS excel and vba as the frontend and backend.

I have set of columns that is basically "day of the month". Each column
has a heading such as 12-Sep
I want to link each cell to a function but the only way i can think of
where cell values change from month to month is to make each heading
cell a hyperlink.
Is this possible or is there another (not too adv ;) ) way to do it?
thanks.


--
norman1nz
------------------------------------------------------------------------
norman1nz's Profile: http://www.excelforum.com/member.php...o&userid=27155
View this thread: http://www.excelforum.com/showthread...hreadid=466678


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
Can an exl hyperlink be set up to open a new browser to the link? badpenny Excel Discussion (Misc queries) 1 August 20th 07 07:55 PM
Excel- Hyperlink or link Mo Excel Discussion (Misc queries) 0 January 8th 06 02:31 AM
possible to link a hyperlink? shellshock Excel Discussion (Misc queries) 1 July 6th 05 09:11 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM
Macro to Copy Hyperlink to another file as a HYPERLINK, not text... dollardoc Excel Programming 1 April 7th 05 12:47 AM


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

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"