Hello, i would just like to know how to properly call a control box in Access VBA such that it updates a cell in an Excel file with that control box after i press a button. To make it more clear, here is what i have so far.
Private Sub Command258_Click()
Dim MySheetPath As String
Dim Xl As Excel.Application
Dim XlBook As Excel.Workbook
Dim XlSheet As Excel.Worksheet
MySheetPath = "P:\Fuse Selection\Database\tcc.xlsm"
Set Xl = CreateObject("Excel.Application")
Set XlBook = GetObject(MySheetPath)
Xl.Visible = True
XlBook.Windows(1).Visible = True
Set XlSheet = XlBook.Worksheets(1)
XlSheet.Range("C3") = Forms("FuseSelection").Text222 <--- Error here
Set Xl = Nothing
Set XlBook = Nothing
Set XlSheet = Nothing
End Sub
I would just like C3 in my respective Excel file to be change to the value in the control box Text222 from my Form in Access.
Thank you.