Add to my macro to save?

bpflyr

Board Regular
Joined
Nov 7, 2005
Messages
116
I have these two macros and would like for them to automatically save the workbook after it does what it does each time I run it. Can anybody help?

Sub GetBDataEntry()
Application.ScreenUpdating = False
Windows("BDataEntry.xls").Activate
Sheets("Data Entry").Select
Range("A3:AF34").Copy
Windows("BLogbook.xls").Activate
Sheets("Log Entry").Select
Cells(Rows.Count, 1).End(xlUp)(2, 1).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=True _
, Transpose:=False
With Application
.ScreenUpdating = True
.CutCopyMode = False
End With
End Sub
----------------------------------------------------------------------------------
Sub ClearBDataEntry()
'
'

'
Windows("BDataEntry.xls").Activate
ActiveWindow.SmallScroll ToRight:=1
Range("A3:AF34").Select
Selection.ClearContents
ActiveWindow.SmallScroll ToRight:=-1
Range("A3").Select
End Sub

Thanks in advance!!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Why not look up 'save' (w/o the quotes) in XL VBA help? You might surprise yourself and figure out how to do the needful yourself. ;)
 
Upvote 0

Forum statistics

Threads
1,211,740
Messages
6,103,640
Members
447,875
Latest member
kaku_1728

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top