Paul Sansom
Board Regular
- Joined
- Jan 28, 2013
- Messages
- 178
- Office Version
- 2021
- 2016
- Platform
- Windows
Hi
Is there a way tocapture the array in AA26:AH43 and then put the values abck to the sheet at theend of the sub
I have a routinethat triggers a Stats App (BERT) by changing Go to 1 and then back to 0
I want to capturethe array within the trigger state
But I want to avoidthe paste values statement before GO state is 0???
Below is code withthe Copy PasteValue part shown
The code is in a Module not an Object
Any guidance gratefully received…. Paul
Is there a way tocapture the array in AA26:AH43 and then put the values abck to the sheet at theend of the sub
I have a routinethat triggers a Stats App (BERT) by changing Go to 1 and then back to 0
I want to capturethe array within the trigger state
But I want to avoidthe paste values statement before GO state is 0???
Below is code withthe Copy PasteValue part shown
The code is in a Module not an Object
Any guidance gratefully received…. Paul
Code:
[FONT=Calibri]Sub RunCalcOnce()[/FONT]
[FONT=Calibri]' RUN CALCULATION ON/OFF from Calc Menu onRibbon[/FONT]
[FONT=Calibri] Application.ScreenUpdating = False[/FONT]
[FONT=Calibri] Sheet13.Range("AA2:AH19").Clear[/FONT]
[FONT=Calibri] Set Go = Sheet22.Range("go")[/FONT]
[FONT=Calibri] IfApplication.COMAddIns("BertRibbon.connect").Connect = True Then[/FONT]
[FONT=Calibri] If Not Range("MRVC") Then[/FONT]
[FONT=Calibri] Application.StatusBar = "StatsApp now Running"[/FONT]
[FONT=Calibri] End If[/FONT]
[FONT=Calibri] If Go = 0 ThenSheet22.Range("go") = 1[/FONT]
[FONT=Calibri] Else[/FONT]
[FONT=Calibri] Application.StatusBar = "Stats Appdoes not appear to be switched on !!"[/FONT]
[FONT=Calibri] Exit Sub[/FONT]
[FONT=Calibri] End If[/FONT]
[FONT=Calibri] If Sheet13.Range("AA27") <>0 And Len(Sheet13.Range("AA27")) > 6 Then[/FONT]
[FONT=Calibri] Sheet13.Range("AA26:AH43").Copy[/FONT]
[FONT=Calibri] Sheet2.Range("CE4").PasteSpecial xlPasteValues[/FONT]
[FONT=Calibri] End If[/FONT]
[FONT=Calibri] Sheet22.Range("go") = 0[/FONT]
[FONT=Calibri] Application.ScreenUpdating = True[/FONT]
[FONT=Calibri]End Sub[/FONT]
Last edited: