+ Reply to Thread
Results 1 to 6 of 6

OK Msgbox

  1. #1
    Forum Contributor
    Join Date
    06-21-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    186

    OK Msgbox

    Hello Gurus,

    I am in need of the code to be able to do the following.

    I am running a macro that copies a picture > opens another excel spread sheet > and pastes it to a user specified range. All works well as is.

    Problem:

    I cannot change the worksheet before specifying the range.

    Is it possible to pause the macro using a msgbox "Select worksheet" > user select the worksheet > and hit "OK" button to resume? I would think I could place the code just before the set Rng command.

    Please Login or Register  to view this content.
    If so, please help, I am beyond my understanding of VBA.

    TIA,
    Tim

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: OK Msgbox

    The inputbox method you give allows you to change the worksheet by clicking on the tabs at the bottom. However, the Rng.select method won't work unless the parent sheet is active. So you would need:
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: OK Msgbox

    Please Login or Register  to view this content.
    When you're selecting the range to paste in with this code, click the sheet tabs to change sheets before selecting a range.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: OK Msgbox

    Why not use the same method you used to select the range?

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-21-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    186

    Re: OK Msgbox

    Thanks Yudlugar!

    Works Perfectly.

    Tim

  6. #6
    Forum Contributor
    Join Date
    06-21-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    186

    Re: OK Msgbox

    thanks for looking into this Solus and John.

    I used Yudlugar's suggestion and it works great without a message box.

    Thanks for helping!

+ 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. MsgBox help
    By john456852 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-02-2012, 06:17 PM
  2. Msgbox: How to do it?
    By alghareeb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2008, 06:45 AM
  3. MsgBox-center the message on a msgbox
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2007, 06:48 AM
  4. [SOLVED] MsgBox-at the end a msgBox popup
    By CC in forum Excel General
    Replies: 4
    Last Post: 05-05-2006, 12:50 PM
  5. [SOLVED] ABOUT MSGBOX
    By Andy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2005, 11:05 PM

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