I have skipped that line of code and found another that worked days
ago and now breaks.  I get "object variable or with block variable not
set" on the line of the if statement. However, I have set tline and
tsdate and they ran in the previous lines code.


If TSDate = TLine.range("A2").Offset(0, DLength).Comment.Text Then
     TLine.range("A3").Offset(intR, DLength).FormulaR1C1 =           
    Format(TSDate, "dd")
     TLine.range("A3").Offset(intR, DLength).Interior.Color = vbYellow
     CFlag = True
End If


--- In [email protected], "chadcbc" <[EMAIL PROTECTED]> wrote:
>
> I have this method to format an excel sheet. It had been working fine,
> until recently, and I have not changed anything.  It just started
> giving me the error "unable to set the columnwidth property of the
> range class"  
> I have tried:
> 
> TLine.range("B2:H2").Offset(0, (Weeks * 7)).select
> Selection.ColumnWidth = 2.14
> 
> I get the same error but the selection class instead of range. any
> help would be greatly appreciated as I am trying to work on other
> areas of this project and am getting quite frustrated with this error.
> 
> Thanks,
> 
>     Set TLine = appExcel.Sheets(1)
>  Do While (Days) >= 0
>         TLine.range("B1:H1").Offset(0, (Weeks * 7)).MergeCells = True
>         TLine.range("B1").Offset(0, (Weeks * 7)).FormulaR1C1 =       
>                              CDate(SDTemp) + (Weeks * 7)
>         TLine.range("B1").Offset(0, (Weeks * 7)).HorizontalAlignment =
> xlCenter
>         TLine.range("B2:H2").Offset(0, (Weeks * 7)).ColumnWidth = 2.14
>         TLine.range("B2").Offset(0, (Weeks * 7)).FormulaR1C1 = "S"
>         TLine.range("B2").Offset(0, (Weeks * 7)).AddComment
>         TLine.range("B2").Offset(0, (Weeks * 7)).Comment.Visible = False
>







 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to