Cannot set visible property to the worksheet class

jarlej

New Member
Joined
Sep 24, 2020
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
Hi,
Could anybody point me to a solution?

I get run-time error '1004' at the last line: Cannot set visible property to the worksheet class

VBA Code:
Sub kopierLoggPedTiltak()
    Sheets("LoggPedTiltak").Copy After:=Sheets(1)
    ActiveSheet.Visible = 1
    Sheets("Innhold").Visible = 0
End Sub

Thanks!

(I used to be a member like 10+ years ago, but couldn't find my old login :()
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Here is a topic on that

Just a note, the activesheet would be visible, you would not have to make it visible.

 
Upvote 0
Hi, and thanks for the tip. I´ve already seen that topic, but I couldn't find a solution in that thread.
 
Upvote 0

Forum statistics

Threads
1,215,647
Messages
6,126,005
Members
449,279
Latest member
Faraz5023

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