manissinha
New Member
- Joined
- Jul 7, 2017
- Messages
- 9
HI
I have create an user form in excel VBA. I need last saved date in user form when user form initialize/open.
I use below code to get data in user form from excel file.
mypath= "path for excel file"
workbooks.open mypath & "\" & "Database.xlsx"
Set ws =n
ActiveWorkbook.sheets("sheets1")
With ws
lstRw = .Rows.Count
UserForm1.Label1.Coption = .range("A" & lstRw).End(xlUp).value
End With
End Sub
the wfile is open and i get the data in userform but the file remains open its not close
please help
I have create an user form in excel VBA. I need last saved date in user form when user form initialize/open.
I use below code to get data in user form from excel file.
mypath= "path for excel file"
workbooks.open mypath & "\" & "Database.xlsx"
Set ws =n
ActiveWorkbook.sheets("sheets1")
With ws
lstRw = .Rows.Count
UserForm1.Label1.Coption = .range("A" & lstRw).End(xlUp).value
End With
End Sub
the wfile is open and i get the data in userform but the file remains open its not close
please help