on 10-19-2016 3:54 PM
Dear BPC Friends,
I am working on BPC 10.1 NW. I am developing a input template which has two worksheets i.e 1) Report and 2) Input_Form.
Report has macro 'Refresh Tab' .This refresh tab work based on value of cell in K22 . When the value of this cell (k22) is "NO" then it will refresh the Report. But when the value of this cell (k22) is "YES" it just need to refresh Input_Form. I am using following code. This code is only working when the value of K22 is "NO".
Kindly advice how the macro should work when the value of K22 is "YES"
Option Explicit
Public Sub Refresh_Data()
Dim EPMObj As New FPMXLClient.EPMAddInAutomation
If Range("k22").Value = "No" Then
EPMObj.RefreshActiveWorkBook
End If
If Range("k22").Value = "yes" Then
EPMObj.refreshworkbook.("Input Schedule")
End If
End Sub
Thanks,
Rahul
Just minimal corrections to JP code:
Public Sub Refresh_Data()
Dim EPMObj As New FPMXLClient.EPMAddInAutomation
If Range("A2").Value = "NO" Then
EPMObj.RefreshActiveWorkBook
Else If Range("A2").Value = "YES" Then
Worksheets("Input Schedule").Activate ' Input Schedule is the name of the sheet
EPMObj.RefreshActiveSheet
End If
End Sub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul,
Sheet 2 is your input schedule sheet name.Try below code:
Option Explicit
Public Sub Button6_Click()
Dim EPMObj As New FPMXLClient.EPMAddInAutomation
If Range("A2").Value = "NO" Then
EPMObj.RefreshActiveSheet
End If
If Range("A2").Value = "YES" Then
Worksheets("Sheet2").Activate
EPMObj.RefreshActiveSheet
End If
End Sub
Regards,
JP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.