![]() |
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 |
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 |
All times are GMT +1. The time now is 05:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com