I have a spreadsheet with dates horizontally in row 2.
I want to be able to click on a hyperlink or a macro button to jump to the cell with the current date in it and preferably highlight the entire column below.
Thanks in advance
I have a spreadsheet with dates horizontally in row 2.
I want to be able to click on a hyperlink or a macro button to jump to the cell with the current date in it and preferably highlight the entire column below.
Thanks in advance
can we have the sample spreadsheet file?
Ajimieta Kuantan
.
.
This macro is in the Sheet Level module. When the sheet is activated, the macro selects the cell in row 2 with the current date.
You can take the same code, modify it slightly to work in the ThisWorkbook module Open Event so when the workbook is first opened, it jumps to the current date.
You can also place the code into a routine module activated by a command button and cause the same effect. Slight modification required.
Please Login or Register to view this content.
For your purposes ... activating by a command button :
Please Login or Register to view this content.
I have tried the two options yet the VBA debugger prevents either from running.
I have attached a file to show my layout.
I would prefer to have control over when to jump to the date as I will scroll all over the sheet when using it.
If the entire column could then be highlighted it would help. As well as forcing the column to the far left of the screen while still displaying the split cells from column A & B visible.
Last edited by Crawfy; 04-04-2017 at 11:26 PM.
Added the last three lines to highlight the column.Please Login or Register to view this content.
You can use the above macro with a command button to activate it. Paste the macro into a routine module.
Thank you. I will play with the colors.
Any way to have this jump to the far left rather then the middle of the screen? Any references within excel I could control?
Any way to return the highlighted column back to original formatting before it was highlighted?
Last edited by Crawfy; 04-04-2017 at 11:38 PM.
Here is a reference for colors : http://access-excel.tips/excel-vba-color-code-list/Please Login or Register to view this content.
If you change this line:to :Please Login or Register to view this content.
You can use the ColorIndex numbers (on the resource website above) to gain more choices. Place the color number where the ?? marks are.Please Login or Register to view this content.
It's really late here and I need to sleep. I'll think about the scrolling part tomorrow. Will let you know if I get it put together.
.
.
If you just want to clear all colors from the sheet ...
Place this line in its own macro activated by its own command button. Something like:
Please Login or Register to view this content.
.
.
Try this addition to the code ....
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks