Looking for insight on if physical memory (or CPU or RAM) could effect Macro accuracy (not speed). As far as my research online goes and with my background the answer is no. However I have tried multiple versions of this chunk of code, it rarely works intermittently when ran as a whole but when I run it in F8 / step by step / break mode it works. The code is not that complicated but I have tried everything I could think of and something physical is the only thing I could think of.
I run a pretty standard issue 32bit ThinkPad, but to note - I am running at 95% physical memory just idling, my IT dept is going to end up reimaging to a 64.
the scenario is I have multiple sheets from other workbooks - but for this example I will only use 2 of them.
--2 sheets from one other workbook being imported to 2 sheets on the target workbook, I am copying and pasting two different areas on each sheet.
--the problem I am running into is the pasting ranges aren't correct they should be pasting on the last used column.
one version
another version
I run a pretty standard issue 32bit ThinkPad, but to note - I am running at 95% physical memory just idling, my IT dept is going to end up reimaging to a 64.
the scenario is I have multiple sheets from other workbooks - but for this example I will only use 2 of them.
--2 sheets from one other workbook being imported to 2 sheets on the target workbook, I am copying and pasting two different areas on each sheet.
--the problem I am running into is the pasting ranges aren't correct they should be pasting on the last used column.
one version
Code:
' ImportWorkbook.Worksheets(3).Range("B25:E59").Copy
' LR = Cells(29, Columns.Count).SpecialCells(xlCellTypeLastCell).Column + 1
' MasterWorkbook.Sheets(3).Cells(25, LR).PasteSpecial Paste:=xlPasteAll, operation:=xlNone, SkipBlanks:=False, _
' Transpose:=False
' ImportWorkbook.Application.CutCopyMode = False
'
' ImportWorkbook.Worksheets(4).Range("B25:E59").Copy
' LR = Cells(29, Columns.Count).End(xlToLeft).Column + 1
' MasterWorkbook.Worksheets(4).Cells(25, LR).PasteSpecial Paste:=xlPasteAll, operation:=xlNone, SkipBlanks:=False, _
' Transpose:=False
' ImportWorkbook.Application.CutCopyMode = False
another version
Code:
ImportWorkbook.Worksheets(3).Range("B25:E59").Copy
Dim xi As Long
xi = Cells(29, Columns.Count).End(xlToLeft).Column + 1
With MasterWorkbook.Worksheets(3)
.Cells(25, xi).PasteSpecial Paste:=xlPasteAll
End With
ImportWorkbook.Application.CutCopyMode = False
ImportWorkbook.Worksheets(3).Range("b25:e59").Copy
Dim xx As Long
xx = Cells(29, Columns.Count).End(xlToLeft).Column + 1
With MasterWorkbook.Worksheets(4)
.Cells(25, xx).PasteSpecial Paste:=xlPasteAll
End With
ImportWorkbook.Worksheets(3).Application.CutCopyMode = False