Alex,
I just tried recording a macro to do that and it worked: see attached below.
If you named the range ahead of time using excel menu Insert/Name you could
use that name in the select method instead of the actual cell. Wouldn't it
be better to create a template xls with all the formatting on it created
interactively in Excel and then just re-use it? Since you use Excel you
should know a Vee add-in called Vxl now exists for connecting Vee with Excel
at http://www.passtechnologies.com. With vxl you would call the macro in a
formula like this: xl.Run("Macro1") after executing the Vee menu item
vxl/OpenWorkbook and opening the xls containing the macro.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 3/22/2002 by Greg Wale
'
'
Range("B2").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub
---------
gregwale@passtechnologies.com
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo. To send messages to
this maillist, just email to "vrf@lvld.agilent.com". Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------
I just tried recording a macro to do that and it worked: see attached below.
If you named the range ahead of time using excel menu Insert/Name you could
use that name in the select method instead of the actual cell. Wouldn't it
be better to create a template xls with all the formatting on it created
interactively in Excel and then just re-use it? Since you use Excel you
should know a Vee add-in called Vxl now exists for connecting Vee with Excel
at http://www.passtechnologies.com. With vxl you would call the macro in a
formula like this: xl.Run("Macro1") after executing the Vee menu item
vxl/OpenWorkbook and opening the xls containing the macro.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 3/22/2002 by Greg Wale
'
'
Range("B2").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub
---------
gregwale@passtechnologies.com
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo. To send messages to
this maillist, just email to "vrf@lvld.agilent.com". Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------