on 10-18-2007 9:36 PM
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
Hi,You have to save the Query Result as Workbook first.
Then go to visual basic editor ( Tools (from excel) > Macro>Visual basic Editor).
You will see your Excel workbook number in the lefthand side of the Window.Expand it by clicking +
it is something like VBAProject(xSAPTemp35363.xls).
under modules you will find 'SAPBEX'. paste the below Code in that module (as it is)
Sub SAPBEXonRefresh(queryID As String, resultArea As Range)
Sheets("Query").Select
Range("C28").Select
ActiveCell.FormulaR1C1 = "Product Name"
Range("A1").Select
End Sub
Save the Workbook.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to save the workbook to save the macro in it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.