Skip to Content
0
Former Member
Oct 18, 2007 at 08:36 PM

Adding the Title to the Column Header

77 Views

Hi Gurus,

Using VBA I added the following code and I could see the title showing only once in the report. but when I try second time, I could not get the same result. Please help me with:

1) How to save the code? do I have to click any button after 'End Sub?

2)If I just close the editor and refresh the query, how the VBA code is activated?

3) Is the header title is going to stay for that query?

4) Pl. give the complete steps

Sub Test()

Sheets("Query").Select

Range("C28").Select

ActiveCell.FormulaR1C1 = "Product Name"

Range("A1").Select

End Sub