+ Reply to Thread
Results 1 to 5 of 5

Warning msg before macro is activated

  1. #1
    Registered User
    Join Date
    01-14-2008
    Posts
    76

    Warning msg before macro is activated

    hello

    is there anyways i can add a msgbox that would apear which would give a warning asking the user if they would like to proceed forward or not, if the person clicks yes then the macro will activate and if they click no then nothing will happen and msg box wil disapear

    The code which i want this msg to com is below:

    Range("A17:E20").Select
    Selection.Delete Shift:=xlUp
    ActiveWindow.SmallScroll Down:=5
    Range("F28:I42").Select
    Range("I42").Activate
    Selection.Cut Destination:=Range("F24:I38")
    Range("K26").Select
    thanks in advance

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    Please Login or Register  to view this content.
    or see link for other examples

    http://www.ozgrid.com/VBA/inputbox.htm

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    01-14-2008
    Posts
    76
    hello
    thanks for your help

    but is there something else i was wondering if you could help me add to the code

    this Cos deletes 3 rows
    i wanted to know if i can tell it that once the range becomes 7 rows long it would not work

    adding to the code below

    Please Login or Register  to view this content.
    thanks in advance
    Last edited by VBA Noob; 01-19-2008 at 01:37 PM.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    You don't need to Select Rows. Can you explain exactly what the code is supposed to do?

    This code should do what your original code was doing.

    Please Login or Register  to view this content.
    Last edited by royUK; 01-19-2008 at 01:54 PM.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    01-14-2008
    Posts
    76
    i have attached a file showing what i mean

    i would reli apreciate it if you could help
    thanks in advance
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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