Problem with report generation
-
Hello every one I want to generate my design my report in excel for that i wrote code like:-
Me.xl = CreateObject("Excel.Application")
Me.xl.Workbooks.Add()
xl.Visible = TrueWith Me.xl.Range("A" & ii, "E" & ii)
.ColumnWidth = 20 .Interior.ColorIndex = 14
end with
now i want to set the width of particular cell this works properly now i want right and left justification of cell like cell "D" so please suggest how should i approach.... thank you.. :) :)
-
Hello every one I want to generate my design my report in excel for that i wrote code like:-
Me.xl = CreateObject("Excel.Application")
Me.xl.Workbooks.Add()
xl.Visible = TrueWith Me.xl.Range("A" & ii, "E" & ii)
.ColumnWidth = 20 .Interior.ColorIndex = 14
end with
now i want to set the width of particular cell this works properly now i want right and left justification of cell like cell "D" so please suggest how should i approach.... thank you.. :) :)
nazimghori wrote:
now i want to set the width of particular cell this works properly
Columns("A:E").ColumnWidth = 20
nazimghori wrote:
now i want right and left justification of cell like cell "D"
If you want it like a particular cell try this...
Range("F4").Select Selection.Copy Range("H4").Select Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False
------------------------------------ "Possessions make you poor, wealth is measurable only in experience." Sun Tzu 621BC