+ Reply to Thread
Results 1 to 2 of 2

Cell Value in a MsgBox

  1. #1
    PCH
    Guest

    Cell Value in a MsgBox

    How do I include a cells value in a message box?

    i.e.
    Msg = "Are you sure you want to delete Quantities? & Cell (A1) Value Here"


    Sub Macro1()

    Dim Msg, Style, Title, Response, MyString
    Msg = "Are you sure you want to delete Quantities? " ' Define message.
    Style = vbYesNo + vbExclamation + vbDefaultButton2 ' Define buttons.
    Title = "Last Chance!!!" ' Define title.
    Response = MsgBox(Msg, Style, Title)

    If Response = vbYes Then

    Range("B7:B27,B30:B40,B43:B51,B54:B66,D7:D13,D16,D19:D50,D53:D66,F7:F60,i3").
    _
    Select
    Range("F7").Activate
    Selection.ClearContents
    Range("B3:D3").Select
    Else ' do nothing.
    End
    End If

    End Sub

  2. #2
    Franz Verga
    Guest

    Re: Cell Value in a MsgBox

    PCH wrote:
    > How do I include a cells value in a message box?
    >
    > i.e.
    > Msg = "Are you sure you want to delete Quantities? & Cell (A1) Value
    > Here"


    Try with this:

    Msg = "Are you sure you want to delete Quantities? & Range("A1").Value


    --
    Hope I helped you.

    Thanks in advance for your feedback.

    Ciao

    Franz Verga from Italy



+ 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