Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm sure I'm doing this wrong, but I'm trying to use an
argument (variable) as a property: Sub Test1() ob1 = InputBox("Border: thin (1) or thick (2): ") If ob1 = 1 Then ob1 = "xlThin" If ob1 = 2 Then ob1 = "xlThick" With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = ob1 .ColorIndex = 1 End With End Sub I've used a MsgBox to confirm that ob1 is indeed set to xlThick or xlThin, but I get run time error 1004 Unable to set Weight property of the Border class. Am I making a simple syntax error, or is this approach not possible? Any help most greatfully appreciated! BruceD |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Too few arguments | Excel Worksheet Functions | |||
Too many arguments | Excel Worksheet Functions | |||
IF-more than 7 arguments | Excel Discussion (Misc queries) | |||
arguments | Excel Discussion (Misc queries) | |||
How Many Arguments? | Excel Programming |