• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Run-time error '1004': Unable to set the Visible Property of the Worksheet class - PLEASE HELP|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Run-time error '1004': Unable to set the Visible Property of the Worksheet class - PLEASE HELP|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosRun-time error '1004': Unable to se…
sp_PrintTopic sp_TopicIcon
Run-time error '1004': Unable to set the Visible Property of the Worksheet class - PLEASE HELP
Avatar
Annalisa Loh
Member
Members
Level 0
Forum Posts: 9
Member Since:
July 6, 2021
sp_UserOfflineSmall Offline
1
September 24, 2021 - 7:37 am
sp_Permalink sp_Print

Hello,

I really need help with some of the VBA coding that I am attempting.  When I try to open my workbook and enter a User Name & Password, something is causing the error to display or hide certain sheets - at least that is what I gather from the description of the error.  I have been researching on many online resources and I can't figure out how to fix this error - or really why it's occurring.  The original workbook pages were not protected or hidden - so I am at a total loss as to how I can fix this. Confused

I will be forever grateful if someone can help me with a fix.

I have attached my report and the User Name and Password is:

User Name = James

Password = pw123

This is just something built for testing, so there is no confidential or real information here.  Please feel free to update and make changes if needed to test it.

Thank you in advance for the help! Smile

Annalisa

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 615
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
2
September 24, 2021 - 5:29 pm
sp_Permalink sp_Print

The Activate code in the form protects the workbook. That means that you can't then change the visibility of any sheet unless you unprotect the workbook again first.

Avatar
Annalisa Loh
Member
Members
Level 0
Forum Posts: 9
Member Since:
July 6, 2021
sp_UserOfflineSmall Offline
3
September 25, 2021 - 2:37 am
sp_Permalink sp_Print

I removed the line in the Activate code in the form, but nothing happens.  I don't get the error any longer, but no sheets appear.  The Login screen shows and stays but nothing else is happening.  Am I missing something else?

I have attached the updated file with the code line "ThisWorkbook.Protect 1234" removed

Please let me know.

Thanks!

Annalisa Smile

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 615
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
4
September 27, 2021 - 10:04 pm
sp_Permalink sp_Print

They are visible, just not active - you still have the front sheet selected which is entirely grey. Also, the sheet tabs have been hidden so there is no obvious way for the user to navigate in this workbook.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Alan Sidman, Emma Klonowski, Natasha Smith
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Annie Witbrod
Forum Stats:
Groups: 3
Forums: 24
Topics: 6212
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31888
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.