Ramesh Deo
Member
Hi SM & NK sir,
Please see the vba coding and please help me out because it not working whatever exactly i want. there are some hidden and filtered worksheet but i want compile data from only all visible worksheets.
Please see the vba coding and please help me out because it not working whatever exactly i want. there are some hidden and filtered worksheet but i want compile data from only all visible worksheets.
Code:
Option Explicit
Sub Get_Data()
Dim sh As Worksheet
Dim sw As Workbook
Dim dw As Worksheet
Application.ScreenUpdating = False
Set sh = Sheet25 ' Data
sh.Range("A3:AB" & Rows.Count).ClearContents
Set sw = Workbooks.Open("C:\Documents and Settings\ramesh\Desktop\Tracker Sheet- CRM.xlsx")
For Each dw In sw.Worksheets
If dw.Visible <> xlVeryHidden Then
dw.Range("A2", dw.Range("AB" & Rows.Count).End(xlUp)).Copy sh.Range("A" & Rows.Count).End(xlUp)(2)
End If
Next dw
sw.Close False
Application.ScreenUpdating = True
End Sub
Last edited by a moderator: