I need to insert an Excel spreadsheet into a VBA form control...my users will make changes to the data in the spreadsheet and then save the file when they are done.
The name of my spreadsheet form control is "Spreadsheet1"...how would I load my Excel file "XYZ.xls" into this control?
I use the following code to load a spreadsheet into Excel, but I want to load and display an Excel file in a VBA form via the spreadsheet control...
This is my code I use to load a spreadsheet into Excel...
Public xlapp As excel.Application
Public xlbook As excel.Workbook
Public xlbookyesno As String
Public xlfilename As String
Public xlSheet As excel.Worksheet
Set xlapp = CreateObject("Excel.Application")
If xlbookyesno = "yes" Then
Set xlapp = xlbook.Parent
Set xlSheet = xlbook.Sheets("KeyNoteList")
MainEditor.BuildCustomList.Caption = Mid(xlfilename, 1, Len(xlfilename) - 4)
Else
End If
Thank you for your help!
Pete
The name of my spreadsheet form control is "Spreadsheet1"...how would I load my Excel file "XYZ.xls" into this control?
I use the following code to load a spreadsheet into Excel, but I want to load and display an Excel file in a VBA form via the spreadsheet control...
This is my code I use to load a spreadsheet into Excel...
Public xlapp As excel.Application
Public xlbook As excel.Workbook
Public xlbookyesno As String
Public xlfilename As String
Public xlSheet As excel.Worksheet
Set xlapp = CreateObject("Excel.Application")
If xlbookyesno = "yes" Then
Set xlapp = xlbook.Parent
Set xlSheet = xlbook.Sheets("KeyNoteList")
MainEditor.BuildCustomList.Caption = Mid(xlfilename, 1, Len(xlfilename) - 4)
Else
End If
Thank you for your help!
Pete