Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
I have a straight table with columns from the dimensions tab as well as the expressions tab. There is one column at the end (dimension column) that will not move to a different position when I drag it. I played around by adding other dimensions after it and they too refuse to move.
Please help / advise.
Thank you.
Regards,
Ashley.
Never mind figured it out
set chart = ActiveDocument.getsheetobject("CH1112")
set cp = chart.GetProperties
need to be at the top of the macro not in the middle.
Hi all
if you use straight table you have flexibility to mix the dimension and expression Oder,
for example if you have the flowing table with
Region,OrderID as dimensions,
QTY, Amount,Discount as expression
Region | OrderID | QTY | Amount | Discount |
---|---|---|---|---|
you can drag them to be like
Region | QTY | Amount | OrderID | Discount |
---|---|---|---|---|
hope it helpful for you,
Regards
Bump... just in case someone is feeling lazy. Worked a treat, thanks all.
sub fixtablesort
set chart = ActiveDocument.getsheetobject("CH336")
set cp = chart.GetProperties
'get the current sort order
d = cp.TableProperties.DisplayOrder
for i = lbound(d) to ubound(d)
msgbox d(i)
next
cp.TableProperties.DisplayOrder = 1
chart.setproperties cp
'get the new sort order
d = cp.TableProperties.DisplayOrder
for i = lbound(d) to ubound(d)
msgbox d(i)
next
end sub
Thanks! I just spent 30 min. trying to find a solution to my straight table ordering issues with expressions among dimensions that would not move order until your simple suggestion of dragging and dropping worked like a charm!
I'm on April 2020 SR4. It's been almost 10 years since this issue got posted, and I'm still running into this problem. As noted in earlier comments, drag/drop doesn't work in my case even after unhiding all the columns. Being stuck on a such a seemingly simple step is immensely frustrating, not to mention extremely difficult to explain to management.