hi all,
i'm trying to format excel from access (vba) and am having some trouble getting the last column used in my sheet.
i have this:
...which gives me the last used column as a number but i can't use the number in a range. i.e sht.range("A1:" & ilastCol & ilastRow).
I need to return the actual column name (i.e X, AT, ZZ). I can do this by doing some kind of module which has a numerical lookup against my value but that seems too long winded.
Does anyone know of an easier way to get the col name.
Many Thanks
Spin.
i'm trying to format excel from access (vba) and am having some trouble getting the last column used in my sheet.
i have this:
Code:
ilastCol = xlSht.Cells(1, Columns.Count).End(xlToLeft).Column
I need to return the actual column name (i.e X, AT, ZZ). I can do this by doing some kind of module which has a numerical lookup against my value but that seems too long winded.
Does anyone know of an easier way to get the col name.
Many Thanks
Spin.