VBA not completing the whole function and no error message is shown

wesbez

New Member
Joined
Oct 29, 2015
Messages
7
Hi All,

I'm trying to run the below macro (recorded) however it stops before it gets to "Rows("1:8").Select" It also paste special values columns AF & AG which I don't want it to do. I've been trying for hours and almost given up hope! Any help is greatly appreciated.

Thanks,
Wes

******************************************

Sub EXPORT_TO_STORE()'
' EXPORT_TO_STORE Macro
'


'
Sheets("Model").Select
Application.Calculation = xlManual
Cells.Select
Selection.Copy
Sheets("Store Feedback").Select
Cells.Select
ActiveSheet.Paste
Columns("A:AV").Select
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("J:J,M:M,U:V,AH:AT,AY:BC").Select
Range("AY1").Activate
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Rows("1:8").Select
Range("A8").Activate
Selection.Delete Shift:=xlUp
ActiveSheet.Outline.ShowLevels RowLevels:=0, ColumnLevels:=1
Sheets("Summary").Select
Range("I27").Select
Application.Calculation = xlAutomatic
End Sub
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hope this helps.
Code:
Sub EXPORT_TO_STORE1() '
' EXPORT_TO_STORE Macro
Dim wsS As Worksheet
Set wsS = Sheets("Store Feedback")
With wsS
    Application.Calculation = xlManual
    Sheets("Model").cells.copy .cells
    Application.CutCopyMode = False
    .Range(.Range("A1"), .cells(Rows.count, 31).End(xlUp)).Value = .Range(.Range("A1"), .cells(Rows.count, 31).End(xlUp)).Value
    .Range(.Range("AG1"), .cells(Rows.count, 33).End(xlUp)).Value = .Range(.Range("AG1"), .cells(Rows.count, 33).End(xlUp)).Value
    .Range("J:J,M:M,U:V,AH:AT,AY:BC").Delete Shift:=xlToLeft
    .Range("1:8").Delete Shift:=xlUp
    .Outline.ShowLevels RowLevels:=0, ColumnLevels:=1
End With
Sheets("Summary").Select
Range("I27").Select
Application.Calculation = xlAutomatic
 End Sub
 
Upvote 0

Forum statistics

Threads
1,216,111
Messages
6,128,898
Members
449,477
Latest member
panjongshing

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top