In VBA, how can I name a range of cells in the current column? It needs to be a relative reference, because the column will change each time I use the macro.
Does VBA run on the web? If so then you might need to provide more information about the server configuration you are using to run it. If not then why are you posting the question on a web forum?
We do allow general questions on hardware and software here in community, but it’s maybe not the best place to go for an answer.
This is a web forum so we really only deal with websties. But you’re lucky enough that some of us have to deal with Excal and Access.
Basically, you just create a variable as a range object.
Dim Myrange as range
Then you give that variable any value that you want. You must use the word SET because you’ll be giving value to an object.
Set Myrange = range("A:A")
Because the column is A:A, it means to take the full column. I wouldn’t use this approach because then you’ll be wasting memory by keeping a lot of empty cells as long with those with information. Unless it is something as simply as copy-paste.
Anyway, if you record a macro selecting the column itself and then look at the code, you will know how to do it without asking. It will put also a lot of crap too but you’ll see how it works.indent preformatted text by 4 spaces
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.