Skip to Content
0
Aug 16, 2016 at 06:51 AM

After Refresh and Before Refresh

1032 Views

Hi Experts,

In workbook ,I am having around 10 sheets. I am using Workbook Refresh macro, there is no Worksheet refresh.

While I am doing Workbook refresh, I want to call Three macro's in between After refresh and before refresh. These three macro should call for two sheets only not for other sheets.

I am trying put if condition in Before Refresh and After Refresh Macro.

I am these macro's into Before /after refresh :CheckDel,Hiddenrrows and UnHiddenrows

But its not working as expected. Pls suggest me on the same.

Dim tem1 As String

Dim tem2 As String

Public Function AFTER_REFRESH() As String

If tem1="Sheetname1" Then

ChecknDel

AFTER_REFRESH = True

Else

If tem2="Sheetname2" Then

Hiddenrows

AFTER_REFRESH = True

Else

AFTER_REFRESH = False

End If

End If

End Function

--------------------------------------------------------

Dim tem_un As String

Public Function BEFORE_REFRESH() As String

If tem_un="Sheetname2" Then

UnHiddenrows

BEFORE_REFRESH = True

Else

BEFORE_REFRESH = False

End If

End Function

Message was edited by: BrahmaReddy Kolli