Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

[BEX] VB MACRO Bi AddOn 7.x

Hi all,

I have a problem with a VB Macro in Bex BI AddOn 7.X,I have to set a Print Area in a Workbook.

I used this VB Macro in a workbook with BEX 3.5

Public Sub SAPBEXonRefresh(queryID As String, resultarea As Range)
    Dim X As Long
    Dim Ultima_colonna As Long
    Dim Ultima_riga As Long
    On Error Resume Next
    
    
' INIZIO FORMATTAZIONE FOGLI
    
    
    If queryID = "SAPBEXq0001" Or queryID = "SAPBEXq0002" Or queryID = "SAPBEXq0004" Or queryID = "SAPBEXq0005" Or queryID = "SAPBEXq0003" Or queryID = "SAPBEXq0006" Then
        Worksheets(resultarea.Worksheet.Name).Select
        Ultima_colonna = resultarea.Cells(resultarea.Cells.Count).Column
        Ultima_riga = resultarea.Cells(resultarea.Cells.Count).Row
       
        ' Area di stampa
        Range(Cells(1, 1), Cells(Ultima_riga, Ultima_colonna)).Select
        ActiveSheet.PageSetup.PrintArea = Selection.Address
        Range("A2").Select
    
    
  
    End If
    
    
' FINE FORMATTAZIONE FOGLI
    

     
End Sub 

I do not understand why this VB Macro dont' work in BEX 7.0

Thx,

ax

Edited by: Alessandro Rizzo on Apr 12, 2010 10:59 AM

Not what you were looking for? View more on this topic or Ask a question