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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
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,214,913
Messages
6,122,207
Members
449,074
Latest member
cancansova

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