+ Reply to Thread
Results 1 to 9 of 9

VBA Macro to run on user selected Workbooks

  1. #1
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    VBA Macro to run on user selected Workbooks

    Hello Members,

    I Have A code which is written in Sheet1 Editor..
    I.e. On a CommandButton Click it executes..

    Now the Code actually unlocks all the Locked cells which are in the workbook

    How can we make this code to run on user defined workbooks?

    Example - On Command Button click the user will be prompted to select the Excel Workbook
    After which this code should get executed on that selected workbook..

    Please suggest...

    I have Attached the sheet
    Attached Files Attached Files
    Regards
    Parth

    I appreciate your feedback. Hit * if u Like.
    Rules - http://www.excelforum.com/forum-rule...rum-rules.html

  2. #2
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: VBA Macro to run on user selected Workbooks

    +Adding - The code actually Bypass the Password on Locked cells & on button click it unlocks the Locked cells on all sheets..

  3. #3
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: VBA Macro to run on user selected Workbooks

    Try the code in the attached file:-
    Attached Files Attached Files
    Last edited by Vikas_Gautam; 03-04-2015 at 09:53 AM.
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  4. #4
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: VBA Macro to run on user selected Workbooks

    Hi Vikas, I have a File which have locked cell for example..
    So its not doing anything... it direct exits from code...

  5. #5
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: VBA Macro to run on user selected Workbooks

    Attaching a sample file on which Column A is locked...
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: VBA Macro to run on user selected Workbooks

    Attaching a sample file on which Column A is locked...

  7. #7
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: VBA Macro to run on user selected Workbooks

    Please ignore duplicate replies.. system issue.. it got stuck
    Last edited by Parth007; 03-04-2015 at 09:46 AM.

  8. #8
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: VBA Macro to run on user selected Workbooks

    Okay I made a Protected file myself, for testing.
    I successfully tested the code after correcting my mistakes.

    Check the file in the post #3.

  9. #9
    Valued Forum Contributor Parth007's Avatar
    Join Date
    12-01-2014
    Location
    Banglore
    MS-Off Ver
    2010
    Posts
    879

    Re: VBA Macro to run on user selected Workbooks

    Amazing Vikas !!! Smooth as pie Thanks for sharing

+ 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. Transfer data between multiple user-selected workbooks
    By UseItOrLoseIt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2013, 12:57 PM
  2. move and align rows based on user selected key columns in two workbooks
    By reteptnarg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-14-2010, 01:08 AM
  3. Replies: 2
    Last Post: 05-27-2010, 06:28 AM
  4. User Selected Range Across Workbooks
    By Mountainman141 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2008, 11:58 AM
  5. macro to copy row selected by user
    By jimb0693 in forum Excel General
    Replies: 8
    Last Post: 04-21-2007, 10:11 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