Hi all,
Hopefully a very simple question.
The above line of code takes cells "A1" to "C1" and connects them, as if they are a chart header, to the cells specified by the variables NumberOfRows and NumberOfColumns.
However, since NumberOfColumns is a variable, the user can specify, say, 6 columns. The problem is that because I'm forced to specify cells "A1:C1" that outputs a chart with only 3 column headers, but 6 columns.
The question is:
How can I express the part of code Range("A1:C1") with "A1:C1" expressed as variables? This would mean I could place a variable there instead of defining specific cells, so that the number of column headers would adapt to the user-specified number of columns.
I'm sure this is probably very simple to do, but I'm very new to Excel VB Code so haven't encountered this before.
Bookmarks