Hi, I have seen your tutorial on userform to get inputs to store data in another worksheet (tab). However, can you also show to store data in another workbook (excel database)?
Hi, I have seen your tutorial on userform to get inputs to store data in another worksheet (tab). However, can you also show to store data in another workbook (excel database)?
You would do something like this:
Sub test()
Dim wbDatabase As Workbook
Set wbDatabase = Workbooks.Open("C:\Test\Test.xlsx")
wbDatabase.Worksheets("Data Sheet").Range("A1").Value = "Your Value"
wbDatabase.Close SaveChanges:=True
End Sub
C:\Test\Test.xlsx is the full path to the other workbook.
Data Sheet is the name of the sheet to put the data on in the other workbook.
Range("A1") is the range reference that controls into which cell the data goes.
This template should get you going.