+ Reply to Thread
Results 1 to 2 of 2

application.run Query

Hybrid View

  1. #1
    Registered User
    Join Date
    11-04-2014
    Location
    uk
    MS-Off Ver
    2010
    Posts
    1

    application.run Query

    Hello,

    Could some please help with this.

    currently I have a macro ( "clear") ( it just clears a worksheet) which I can run remotely from another workbook ( Russia2007.xls").

    The macro runs fine from any workbook and any worksheet

    Application.Run "Russia2007.xls!clear"


    What I wanted to do was get the macro to run on a different worksheet than the active worksheet.

    eg ..if my current worksheet is "sales" and I want to run Application.Run "Russia2007.xls!clear" to clearworksheet "depts"

    it doesn't seem to work.

    I thought this would work..Sheets("depts").Application.Run "Russia2007.xls!clear"


    I currently get around this by

    this_sheet = ActiveSheet.Name
    this_cell = ActiveCell.Address
    sheet("depts").select
    Application.Run "Russia2007.xls!clear"
    Sheets(this_sheet).Select
    range(this_cell).Select

    I just wanted to streamline the process without having to jump to the sheet and run the clear macro.

    Any help would be greatly appreciated.

    Regards,

    patcunn.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: application.run Query

    Post the "clear" code.

    Oh, and please use CODE tags when you post code.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

+ 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. [SOLVED] Obscure VBA error? Application.Run conflicts with Application.GetOpenFileName
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-15-2013, 08:31 PM
  2. [SOLVED] Application creation query
    By AndyE in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2013, 03:33 PM
  3. Application.ontime query
    By shaukat in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-25-2011, 04:45 PM
  4. Application.FollowHyperlink Query
    By n_s_simpson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-09-2006, 06:41 AM
  5. [SOLVED] Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen)
    By Paul Martin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-05-2005, 12:05 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