hi,
Does anyone know how to set a multiple permanent function keys?
Ex. if i want to assign F6 for making the cell text red and F7 for making the cell text green?
Thanx
hi,
Does anyone know how to set a multiple permanent function keys?
Ex. if i want to assign F6 for making the cell text red and F7 for making the cell text green?
Thanx
Perhaps this could be of help?
http://www.youtube.com/watch?v=Ys2XX4qhS7k
Alf
Thanx for trying, but i could not understand it. Will have to see if a similar english version is available.
Sorry about that, but I assumed since your location is India that the youtube video would be ok.
One way you can do it is as follows right click on a sheet tab. Then click on "View Code". In the new windows that opens paste the following code
Then you need to go to the "Developer" tab and click on "Visual Basic". In the VB windows that opens click "Insert" and then click "Module" then paste the two pieces of code in the module window.![]()
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.OnKey "{F6}", "Set_Red" Application.OnKey "{F7}", "Set_Green" End Sub
The "Private Sub" will activate the "Set_Red" macro when you press F6 or "Set_Green" if you press F7. As both this macros are keyed to the active cell the font color will change in this cell so if you wish to type and change font color after pressing "Enter" I suggest you go to "Options" select "Advanced" and under "Editing Options" untick box marked "After pressing Enter, move selection". This way you ensure that the active cell is the one you just made an input to.![]()
Sub Set_Red() ActiveCell.Font.Color = -16777024 End Sub Sub Set_Green() ActiveCell.Font.Color = -11489280 End Sub
Alf
Thanx man. That helped
![]()
useful stuff, well explained by u sir.
Hi thegrandmaster!
Thanks for feedback and rep!
Hi Kamal
Thanks for feedback and pleased to hear you found this useful.
Alf
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks