Nov 19, 2001 #1 AgentM MIS Jun 6, 2001 387 US Can somebody give me the code for drawing Borders around a cell in a worksheet in Excel? I have tried recording a macro. But it gives errors. Any help appreciated.
Can somebody give me the code for drawing Borders around a cell in a worksheet in Excel? I have tried recording a macro. But it gives errors. Any help appreciated.
Nov 19, 2001 1 #2 FengShui1998 MIS Apr 27, 1999 705 US ' Color = 1 ' Style = 1 ' Wt = 4 (xlThick) or 2 (xlThin) XEdge = 8 'Top XEdge = 9 'Bottom XEdge = 7 'Left XEdge = 10 'Right Actv.Range(Xrange).Borders(xEdge).Color = 1 Actv.Range(Xrange).Borders(XEdge).LineStyle = 1 Actv.Range(Xrange).Borders(XEdge).Weight = 4 fengshui_1998 Upvote 0 Downvote
' Color = 1 ' Style = 1 ' Wt = 4 (xlThick) or 2 (xlThin) XEdge = 8 'Top XEdge = 9 'Bottom XEdge = 7 'Left XEdge = 10 'Right Actv.Range(Xrange).Borders(xEdge).Color = 1 Actv.Range(Xrange).Borders(XEdge).LineStyle = 1 Actv.Range(Xrange).Borders(XEdge).Weight = 4 fengshui_1998
Nov 19, 2001 Thread starter #3 AgentM MIS Jun 6, 2001 387 US Thank you very much. That worked Upvote 0 Downvote
Nov 29, 2001 Thread starter #4 AgentM MIS Jun 6, 2001 387 US How did you come across the numeric equivalent of XEdge for Top, Bottom etc...? Thank you Upvote 0 Downvote
Nov 29, 2001 #5 FengShui1998 MIS Apr 27, 1999 705 US AgentM, Try this: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q239930 fengshui_1998 Upvote 0 Downvote