+ Reply to Thread
Results 1 to 5 of 5

Need Help With Workbook Selection

  1. #1
    Registered User
    Join Date
    03-26-2019
    Location
    L.A
    MS-Off Ver
    2016
    Posts
    20

    Need Help With Workbook Selection

    Greetings experts,

    I have this code and what I am trying to do is help the user select a workbook and run CodeOne on the selected workbook.

    Please Login or Register  to view this content.
    I need help changing the "Worksheet" reference in CodeOne as it is selecting the current workbook the code is on and not the workbook the user selects.

    Any help is much appreciated!

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Need Help With Workbook Selection

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    03-26-2019
    Location
    L.A
    MS-Off Ver
    2016
    Posts
    20

    Re: Need Help With Workbook Selection

    @AlphaFrog Thank You for your reply!

    I am trying to make it close the opened file like this but it is showing run time error. Where can I put this line or how should I close the file which was selected
    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Need Help With Workbook Selection

    ActiveWorkbook.Close SaveChanges:=True

  5. #5
    Registered User
    Join Date
    03-26-2019
    Location
    L.A
    MS-Off Ver
    2016
    Posts
    20

    Re: Need Help With Workbook Selection

    @AlphaFrog Hi, thanks for all your help!

+ 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. Replies: 10
    Last Post: 07-07-2018, 03:05 AM
  2. [SOLVED] Help Importing from another workbook and pasting multiple selection on original workbook
    By bdouglas1011 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-21-2017, 12:40 AM
  3. Replies: 0
    Last Post: 02-06-2015, 04:50 PM
  4. Replies: 7
    Last Post: 08-09-2011, 04:31 AM
  5. SAME Cell selection across the workbook
    By NeilE in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-07-2011, 09:42 AM
  6. Macro to copy selection workbook to workbook
    By mrparrot in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2010, 05:39 PM
  7. Listbox selection to a different workbook
    By pprseller in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-28-2009, 08:49 AM

Tags for this Thread

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