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

  • SEARCH
  • Home
  • 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 8493063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:54:14+00:00 2026-06-10T22:54:14+00:00

I for now have my workbook set up this way, in where the workbook

  • 0

I for now have my workbook set up this way, in where the workbook is hard coded into the Set command, I am wondering if there is a way of doing this so I can have it where it is fluid? So no matter where this code is place (in another workbook) the code will adapt to it’s new surroundings.

Does this make sense?

Below is what I am using now, what I’d like to have it do is for the ActiveWorkbook or something of the sort be used instead. Since this will be set at the beginning of the code and not the middle.

Set wbOOR = Application.Workbooks("Open Order Report.xlsm")

  • 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-10T22:54:16+00:00Added an answer on June 10, 2026 at 10:54 pm

    You’re probably after Set wbOOR = ThisWorkbook

    Just to clarify

    ThisWorkbook will always refer to the workbook the code resides in

    ActiveWorkbook will refer to the workbook that is active

    Be careful how you use this when dealing with multiple workbooks. It really depends on what you want to achieve as to which is the best option.

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

Sidebar

Related Questions

I now have a file uploader that goes on like this This is the
The javascript code I now have can toggle a single row of data. Whether
I have a VB6/VBA application that hooks into Excel and loads a workbook. It
I have an Excel workbook that utilises a data table (A). I now want
I have four classes User profiles Activity Workbook user can have many profiles based
I now have a running Java program which only lacks of the final step,that
in /usr/local i now have two mysql folders: mysql-5.1.34-osx10.5-x86 mysql-5.1.37-osx10.5-x86_64 is it possible to
I'm learning scheme and until now have been using guile. I'm really just learning
With help from you guys I now have a script that works like a
Good day! I right now have a function the drags an element from a

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.