Hi all,
I'm trying to read data from an excel file which the excel's visible is false and UserForm only is shown after run it.
I'm running this code in current excel file :
But after run this code, user form is shown, is there a way to pull data from target xlsm without display UserForm or ignore it? (only reading data without seeing any userform)
Thanks in advanced.
I'm trying to read data from an excel file which the excel's visible is false and UserForm only is shown after run it.
I'm running this code in current excel file :
VBA Code:
Application.ScreenUpdating = False
Dim appexcel As Excel.Application
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Set appexcel = GetObject(, "Excel.application")
Set wb = appexcel.Workbooks.Open("C:\Users\Windows\Desktop\maindata.xlsm")
Set ws = wb.Worksheets(1)
appexcel.Visible = False
...
...
But after run this code, user form is shown, is there a way to pull data from target xlsm without display UserForm or ignore it? (only reading data without seeing any userform)
Thanks in advanced.