Hi
This is an old subject thats been discussed several times, I know, but I'm still struggling...
I've made a formular that when its filled in is copy/paste from a button to a new sheet.
It runs like a charm from VBE, but when I use a button to do the job, Excel slows down with menus grayed out.
I just can't figure out, how to fix this.
Hopefully some of you know, what to do.
I'm quite new to VBA so please be detailed in explanation
Here is my macro:
Sub TestNytProjektNytArk04()
'Workbooks("TestHastighedNytProjekt.xlsm").
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Worksheets("Forside").Range("B3:C11").Copy 'the button appear on the sheet "Forside"
Sheets.Add after:=ActiveSheet
Range("B3").PasteSpecial Paste:=xlPasteAll
Columns("B:B").EntireColumn.AutoFit
Columns("C:C").EntireColumn.AutoFit
Range("B14").Select 'I select a cell to make the gray color from the paste function dissapear
Sheets("Forside").Select 'I select this page again to cancel the copy function
Application.CutCopyMode = False
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
This is an old subject thats been discussed several times, I know, but I'm still struggling...
I've made a formular that when its filled in is copy/paste from a button to a new sheet.
It runs like a charm from VBE, but when I use a button to do the job, Excel slows down with menus grayed out.
I just can't figure out, how to fix this.
Hopefully some of you know, what to do.
I'm quite new to VBA so please be detailed in explanation
Here is my macro:
Sub TestNytProjektNytArk04()
'Workbooks("TestHastighedNytProjekt.xlsm").
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Worksheets("Forside").Range("B3:C11").Copy 'the button appear on the sheet "Forside"
Sheets.Add after:=ActiveSheet
Range("B3").PasteSpecial Paste:=xlPasteAll
Columns("B:B").EntireColumn.AutoFit
Columns("C:C").EntireColumn.AutoFit
Range("B14").Select 'I select a cell to make the gray color from the paste function dissapear
Sheets("Forside").Select 'I select this page again to cancel the copy function
Application.CutCopyMode = False
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub