G
GeorgeM
I have Access producing a spreadsheet, all is working well except I would
like to preset a column width. The sample below fails on the last line;
'calc cash difference
strFormula = "=if(F" & RowNum & ">0, F" & RowNum & "-G" & RowNum &
",0)"
objSht.Cells(RowNum, "H") = strFormula
'hide the unnecessary
objSht.Columns("D").Hidden = True
objSht.Columns("I").Hidden = True
objSht.Columns("A").Width = 10
This last line produces error "Unable to set Width property of the Range
class", what am I doing wrong???
Any advice is much appreciated, George
like to preset a column width. The sample below fails on the last line;
'calc cash difference
strFormula = "=if(F" & RowNum & ">0, F" & RowNum & "-G" & RowNum &
",0)"
objSht.Cells(RowNum, "H") = strFormula
'hide the unnecessary
objSht.Columns("D").Hidden = True
objSht.Columns("I").Hidden = True
objSht.Columns("A").Width = 10
This last line produces error "Unable to set Width property of the Range
class", what am I doing wrong???
Any advice is much appreciated, George