How do I get this marco to work in your spreadsheet? It works in Excel. I have enable
Application.Run “‘shop sales control.xlsm’!copy”
Application.Run “‘shop sales control.xlsm’!SaleReplace”
I borrowed this VBA code, this is the entire Macro.
Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Sub Dayendsales()
’
’ Dayendsales Macro
’
’
Sheets(“Tsales”).Select
Columns(“G:G”).Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range(“E2:E255”).Select
Selection.copy
Range(“G2”).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets(“sales”).Select
Range(“B3:D1572”).Select
Application.CutCopyMode = False
Selection.ClearContents
Range(“D3”).Select
End Sub
Sub DayendPurchases()
’
’ DayendPurchases Macro
’
’
Sheets(“Tpurchase”).Select
Columns(“F:F”).Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Range(“D2:D643”).Select
Selection.copy
Range(“F2”).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets(“purchase”).Select
Range(“C3:D625”).Select
Selection.ClearContents
Range(“E3”).Select
End Sub
Sub SaveBill()
’
’ SaveBill Macro
’
’
Application.Run “‘shop sales control.xlsm’!copy”
Application.Run “‘shop sales control.xlsm’!SaleReplace”
End Sub
Sub DayEnd()
’
’ DayEnd Macro
’
’
End Sub