Hello all,
I have a userform that opens on workbook oepn. the userform has multiple tabs. each tab is a different from that workers fill out during their shift. at the end of the day, the employee can save each tab via a command save button that grabs all the info from that tab, opens a specific workbook, and transfers all the data into that workbook and saves as a new excel file. Then, the original workbook needs to be closed without saving any changes. Keep in mind this is not the workbook that contains the userform, this is a workbook that the command save button opens. I use Workbooks("Blank_BSD_BETA1.1.1.xlsm").Close SaveChanges:=False as i dont want changes to be saved to it. the code to here executes perfect, but when the workbook is closed, it makes my userfrom disappear. I can bring the userform back up from a button on the workbook, but all the data on the tabs is lost. If anyone can help would be greatly appreciated. i need the user form to remain open while the VBA opens, transfers and closes other workbooks. Attached is a image from the userform
This is the code that opens a different workbook where the files are being transferred.
then in this workbook, at the end of the code, i have Workbooks("Blank_BSD_BETA1.1.1.xlsm").Close SaveChanges:=False
this causes to loose my userform and all the data entered on the other tabs before they have been saved.
I have a userform that opens on workbook oepn. the userform has multiple tabs. each tab is a different from that workers fill out during their shift. at the end of the day, the employee can save each tab via a command save button that grabs all the info from that tab, opens a specific workbook, and transfers all the data into that workbook and saves as a new excel file. Then, the original workbook needs to be closed without saving any changes. Keep in mind this is not the workbook that contains the userform, this is a workbook that the command save button opens. I use Workbooks("Blank_BSD_BETA1.1.1.xlsm").Close SaveChanges:=False as i dont want changes to be saved to it. the code to here executes perfect, but when the workbook is closed, it makes my userfrom disappear. I can bring the userform back up from a button on the workbook, but all the data on the tabs is lost. If anyone can help would be greatly appreciated. i need the user form to remain open while the VBA opens, transfers and closes other workbooks. Attached is a image from the userform
This is the code that opens a different workbook where the files are being transferred.
VBA Code:
Private Sub CommandButton1BSD_Click()
Workbooks.Open Filename:="G:\03 PROJECTS\Reports\Scanned Forms for Ivan\Digital Forms\Blank_BSD_BETA1.1.1.xlsm"
then in this workbook, at the end of the code, i have Workbooks("Blank_BSD_BETA1.1.1.xlsm").Close SaveChanges:=False
this causes to loose my userform and all the data entered on the other tabs before they have been saved.