Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I program in VBA some Excel behaviours like colored-cell-.
How do I program in VBA some Excel behaviours like colored-cell-borders
after pressing F2? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I program in VBA some Excel behaviours like colored-cell-.
HI,
Place the following code in 'ThisWorkbook': '################################################# ####### Sub Auto_Open() Application.OnKey "{F2}", "myBorders" End Sub '################################################# ####### Insert a module and place the following code: '################################################# ####### Public Sub myBorders() On Error Resume Next With Selection.Borders(xlEdgeLeft) ..LineStyle = xlContinuous ..Weight = xlThin 'xlMedium xlThick xlHairline ..ColorIndex = 15 End With With Selection.Borders(xlEdgeTop) ..LineStyle = xlContinuous ..Weight = xlThin 'xlMedium xlThick xlHairline ..ColorIndex = 15 End With With Selection.Borders(xlEdgeBottom) ..LineStyle = xlContinuous ..Weight = xlThin 'xlMedium xlThick xlHairline ..ColorIndex = 15 End With With Selection.Borders(xlEdgeRight) ..LineStyle = xlContinuous ..Weight = xlThin 'xlMedium xlThick xlHairline ..ColorIndex = 15 End With End Sub '################################################# ####### HTH--Lonnie M. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I program in VBA some Excel behaviours like colored-cell-.
If you could explain more precisely what you would like to do then I may be
able to help. Exactly which behaviours do you wish to emulate? "TEXNAC" wrote: How do I program in VBA some Excel behaviours like colored-cell-borders after pressing F2? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 - cell borders not visible when cells colored | Excel Discussion (Misc queries) | |||
Is there a way to unload the loaded XLL file in Excel? Hi all, I amdebugging XLL link library using Visual C++. Everytime I rebuild the XLL, Ihave to close the whole Excel program and relaunch the Excel program again,and then load in the newly gene | Excel Discussion (Misc queries) | |||
colored a cell | Excel Programming | |||
merging excel program with tdc finance program | Excel Programming | |||
Cell right next to colored cells is automatically colored on entering a value | Excel Programming |