Is there a workaround to get a copy + paste macro to work within a Modano workbook. The following simple macro pastes zeros in a Modano workbook but works as intended in the released version of the same workbook so I assume there is some Modano interference (potentially with the clipboard) somewhere:
Sub Cash_Tax_Simple()
Range("RA_Tax_Calc").Select
Selection.Copy
Range("RA_Tax_Hard_Code").Select
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub
Hi Tarjei,
You need to temporarily switch off Application.EnableEvents when using VBA to manipulate content within module components - there's a an example here: www.modano.com/forum/vba_modular_workbooks.
Also, can you please NEVER EVER USE EITHER 'SELECT' OR 'PASTESPECIAL' IN A VBA MACRO AGAIN, as both are bad practice and should be avoided. Here's how I'd recommend doing it instead:
M.
Thank you Mike - that worked and apologies for the terrible coding!