Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8537177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:50:13+00:00 2026-06-11T10:50:13+00:00

Excuse me, something is wrong again Standard module : Public ws1 As Worksheet Public

  • 0

Excuse me, something is wrong again
Standard module :

Public ws1 As Worksheet
Public rCopy As Range

Workbook_Open :

Set ws1 = Sheets("abc")
Set rCopy = ws1.Range("A1")

Third module :

ws1.Select ' Error
rCopy.Select ' Error

Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:50:15+00:00Added an answer on June 11, 2026 at 10:50 am

    The code you have posted does work.

    One reason you may get an error is if you have been debugging your code and at some point had an error and stopped excution, the public variables will no longer be set. You simply need to run the Workbook_Open sub again (you can run it from the IDE, using F5)

    Note, you should take the advise from you last question and use Set ws1 = Thisworkbook.Sheets("abc"). If you don’t you run the risk that ws1 will get set to sheet abc in another workbook, because as written it is equivalent to Set ws1 = ActiveWorkbook.Sheets("abc")

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new here so please excuse if I'm doing something wrong. I attempt to
Excuse my ignorance if this is something basic, I am somewhat new to the
Excuse my ignorance, but something's been bugging me about the Xcode debugger when running
I'm new to creating Chrome Extensions, so please excuse if I'm missing something obvious.
Excuse me if this is the wrong place to ask. I have been using
Please excuse me if I'm doing something really stupid, but I'm a little new
Excuse me, how could I possible do something like this? I have a DIV,
excuse the title, i couldn't come up with something short and to the point...
Please excuse me if this is something simple I am overlooking. I am making
I'm very new to XQuery so excuse me if I am somehow missing something.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.