emiguy
New Member
- Joined
- Feb 25, 2021
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
Hi everyone.
I asked part one of this question and it was answered quickly. HOW CAN I FIND THAT THREAD SO I DON'T DUPLICATE IN THE FUTURE?? (uggh....sorry)
Goal: I have a 365 macro to save the file as a XLS file, then a PDF. Someone (thank you to that person!!) answered the question, but now that edit in my code (see below and image) causes a WITH error.
Also, I'm not a VBA'er -But- am learning the power of writing VBA ==> What resources are good? Something with "Heres an example of using VBA to....." instead of "Here are some commands to learn."
Here's the full code
Thanks !!
Kirk
USA , Pennsylvania
I asked part one of this question and it was answered quickly. HOW CAN I FIND THAT THREAD SO I DON'T DUPLICATE IN THE FUTURE?? (uggh....sorry)
Goal: I have a 365 macro to save the file as a XLS file, then a PDF. Someone (thank you to that person!!) answered the question, but now that edit in my code (see below and image) causes a WITH error.
Also, I'm not a VBA'er -But- am learning the power of writing VBA ==> What resources are good? Something with "Heres an example of using VBA to....." instead of "Here are some commands to learn."
Here's the full code
VBA Code:
//----------------------- BEGIN VBA
'============ MYMACRO
Sub AA_PW_Changer_on_its_file_021121()
' PW changer saver as PD fand xls 02-11-21 1230 XLS kept dpoing "autorecovered file" in macro ??
' A_save_PW_as_xls_and_pdf Macro
' turn off application alerts
'
'========== TURN OFF APPLICATION ALERTS
'
With Application.DisplayAlerts = False 'Turns off alerts
AlertBeforeOverwriting = False 'Turns of overwrite
Alerts.ScreenUpdating = False 'Turns of screen updating
End With
' ------------------------------------------------------------------------------------------
ActiveWorkbook.SaveAs Filename:= _
"E:\Dropbox\G_Drive_PA_HH\EXCEL\password changer.xlsm", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"E:\Dropbox\G_Drive_PA_HH\EXCEL\password changer.pdf", Quality:=xlQualityStandard _
, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
False
ActiveWorkbook.SaveAs Filename:= _
"E:\Dropbox\G_Drive_PA_HH\EXCEL\password changer.xlsm", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=True
ActiveWindow.SmallScroll Down:=-75
Range("F3:J7").Select
' ------------------------------------------------------------------------------------------
'========== TURN ==> on <== APPLICATION ALERTS
'
With Application.DisplayAlerts = True 'Turns back on alerts
AlertBeforeOverwriting = True 'Turns on Overwrite alerts
ScreenUpdating = True 'Turns on screen updating
End With
End Sub
//----------------------- END vba
Thanks !!
Kirk
USA , Pennsylvania
Last edited by a moderator: