Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi to Everybody,
I would like write a macro to fit colum to data.
I wrote:
sub fitColumn
set obj = ActiveDocument.GetSheetObject("CH157")
set cp = obj.GetProperties
set expr = cp.Expressions.Item(1).Item(0).Data.ExpressionVisual
expr.ColWidth = 800
obj.SetProperties cp
end sub
but it doesn'work
What's the problem?
Thanks in advance
try this
sub x
set chart = ActiveDocument.GetSheetObject("CH02")
chart.SetPixWidth 0,100
chart.SetPixWidth 1,100
chart.SetPixWidth 2, 0
end sub
I have to fit column width no the window zoom
I have a Pivot table, the code:
chart.SetPixWidths 0,w
chart.EqualPixWidths 1
doesn't work
Thank you
try this
sub x
set chart = ActiveDocument.GetSheetObject("CH02")
chart.SetPixWidth 0,100
chart.SetPixWidth 1,100
chart.SetPixWidth 2, 0
end sub
Hello Er
For reference i have a pivot table with 2 columns.
I use at edit module the below macro as you post :
sub x
set chart = ActiveDocument.GetSheetObject("CH82")
chart.SetPixWidth 0,200
chart.SetPixWidth 0,900
end sub
The problem is that it takes only the wider width and adjust the other...
Any suggestion?
Thank you for your time.