FlexGrid Vb6 to Excel - Format Cell
Hi,
I am trying to format a cell by using code on vb6. I have three cells but all I want to do is format the centre on to have wrap text active and set a height and with for it. Is there anyway I can alter the code below to do this?
Code:
For intCol = 1 To TheCols
oSheet.Columns(intCol).AutoFit
'wsXL.Columns(intCol).AutoFormat (1)
oSheet.Range("a1", Right(oSheet.Columns(TheCols).AddressLocal, _
1) & TheRows).AutoFormat GridStyle
Next
Thanks
pmelia07
Re: FlexGrid Vb6 to Excel - Format Cell
Maybe you have to autofit a full column o row like this:
Range("A1").Select
Columns("A:A").EntireColumn.AutoFit
Rows("1:1").EntireRow.AutoFit