The macro I have created copies the rows and columns in Sheet1 to Sheet3. However, my selection range varies. Sometimes the area is Range("A1:D94").Select . Sometimes the area is Range("A1:D125").Select . I need to calculate the CalculateRowMajorOrder and replace the Range("A5:G94").Select with Range(strRange).Select. I have tried declaring strRange as a String and as an Object. It always blows up at the 'strRange= CalculateRowMajorOrder line.
Am I using the method wrong?
'strRange = CalculateRowMajorOrder
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _