3
How to use the name of a cell of the Excel spreadsheet in VBA, not to indicate row and column?
For example, I named "Client Name" to cell B20, when I use this name in VBA to put in label ( label1.caption = Client Name ), it accepts and does not give error. However, it does not take the cell value.
As I am inserting columns and rows, the cell changes, but the VBA evidently does not hit the rows and columns of the range command.
How do I use the cell name directly?
I don’t quite understand what you want, you want to take the column you just included so you can change some property of it?
– Ricardo
I didn’t really explain. I named a cell in Excel and I want to use the name defined in Excel as a variable in VBA, not to need to change row and column every change in the worksheet, this is it
– Leo
I edited the answer, this would be my best suggestion for you. I do not believe it is possible to do what you want in VBA
– Ricardo
jbueno, I thought it was possible to do something like this, but indirectly you can do it, even though it is more work. Grateful
– Leo