Maya Maile
New Member
- Joined
- Jan 13, 2022
- Messages
- 2
- Office Version
- 365
- 2016
- Platform
- Windows
- Mobile
Hi All,
I am having a recorded macro on a excel sheet.
I have a button on another sheet to run this macro.
When I run the macro it says the following error.
I want to add two lines. First to unhide the sheet where the macro is running and second hide it automatically.
(Recorded Macro Code)
Thanks in advance.
I am having a recorded macro on a excel sheet.
I have a button on another sheet to run this macro.
When I run the macro it says the following error.
I want to add two lines. First to unhide the sheet where the macro is running and second hide it automatically.
(Recorded Macro Code)
VBA Code:
Sub DeleteDuplicates()
'
' DeleteDuplicates Macro
'
'
Sheets("ABCTable").Visible = True
Columns("H:H").Select
Selection.Copy
Range("I1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.Range("$I$1:$I$1048568").RemoveDuplicates Columns:=1, Header:= _
xlNo
Range("I3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("A3000").Select
Selection.End(xlUp).Select
Range("A3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sorting
Sheets("ABCTable").Visible = False
End Sub
Thanks in advance.
Last edited by a moderator: