+ Reply to Thread
Results 1 to 3 of 3

two questions referencing a cell in a macro for folder and running a macro on one sheet

  1. #1
    Registered User
    Join Date
    05-05-2016
    Location
    Colorado, US
    MS-Off Ver
    2010
    Posts
    2

    two questions referencing a cell in a macro for folder and running a macro on one sheet

    Hi there! I have 2 questions, but first I will input the code:
    Please Login or Register  to view this content.
    So this formula works great except for 2 things - It runs on every workbook, I want to limit it just to the workbook and sheet I'm in. I also don't even need it to be running in the foreground and would prefer it just run silently in the background no matter what others worksheets or workbooks I am in, as long as this one is open.

    The other problem I have is instead of C:\Users\blue\Documents" I want it to read blue as a variable that I input on lets say Sheet "Y". So if sheet Y has "blue" in Cell A1, and I change is to "red", the macro will look for C:\Users\red\Documents" instead.

    Thank you for your help!
    Last edited by adebusk; 05-05-2016 at 04:43 PM.

  2. #2
    Registered User
    Join Date
    04-07-2016
    Location
    London
    MS-Off Ver
    2013
    Posts
    34

    Re: two questions referencing a cell in a macro for folder and running a macro on one shee

    Try the below code, in this, it will run for "X" sheet only, since the third line of code is activating that sheet only

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-05-2016
    Location
    Colorado, US
    MS-Off Ver
    2010
    Posts
    2

    Re: two questions referencing a cell in a macro for folder and running a macro on one shee

    That worked just about perfect. The only thing I'm missing is I would like for the macro to run 100% silent, in the background. I.e. If I'm on sheet "B" I want it to run only on sheet "X" and not continually pop over to sheet "X"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. in Sheet `inputs' Clear Cell D1 and copy from F1 before running the macro.
    By thilag in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-10-2016, 03:44 AM
  2. [SOLVED] Running a macro on multiple workbooks in a folder
    By Sweepin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-29-2013, 08:11 PM
  3. [SOLVED] Macro running on active sheet instead of sheet defined in macro
    By davegscott in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-19-2013, 02:04 PM
  4. Running A macro through multiple files in a folder
    By Briansva92 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-31-2012, 01:26 PM
  5. Replies: 2
    Last Post: 06-03-2012, 03:33 PM
  6. macro to save specific sheet as pdf direct to folder linked via cell
    By sdts in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-17-2012, 05:45 AM
  7. Questions regarding Cell Referencing
    By hparteep in forum Excel General
    Replies: 1
    Last Post: 04-01-2006, 12:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1