Excel 2013 VBA Resize not working -
i writing excel sheet buttons run vba. each button picks cell @ beginning of range use, length(number of cells used), , couple of other parameters entered user, , sends information sub, resizes range contains 1 cell number of cells entered in length
when use
sub getfromctlgx(rangetofill range, name, tagname, taglength) rangetofill = rangetofill.resize(1, taglength)
my range, "rangetofill" not changed @ all.
if use
sub getfromctlgx(rangetofill range, name, tagname, taglength) rangetofill.resize(1, taglength)
the code faults , doesn't compile.
has else run problem? missing something?
i found mistake in code,
it should have been
set rangetofill= rangetofill.resize(1, taglength)
it's odd though.... still doesn't explain me why
rangetofill.resize(1, taglength)
wasn't working, that's used in majority of examples saw. i'm surprised there wasn't error not having set keyword there.
Comments
Post a Comment