+ Reply to Thread
Results 1 to 2 of 2

message box popup with variable

  1. #1
    Registered User
    Join Date
    06-03-2013
    Location
    brussels
    MS-Off Ver
    Excel 2007
    Posts
    94

    message box popup with variable

    Dear,

    I have the following code in my macro

    Set findRNG = sheetje.Range("B1").Find(What:="POPU*Virtual")
    'Search next value
    Set findRNG2 = sheetje.Range("B1").Find(What:="DO_POPU")


    However, I would like to create at the beginning of the report ( before running the macro) to pop up a window message box
    asking for which domain the macro need to be run ( in this case POPU), the domain is always 4 digits long

    in other words I should need to create a variable in my macro which would need to be completed in the message window.

    Could someone help me out?

    Thanks a lot!

    Rickmeister





    I have tried the following but got an error:


    Dim VariableDomainName As String

    VariableDomainName = InputBox("Domain", "Enter the Domain name", "")

    '8A: Find "Column number" on the sheet
    Set findRNG = sheetje.Range("B1").Find(What:=VariableDomainName * "Virtual")
    'Search next value
    Set findRNG2 = sheetje.Range("B1").Find(What:="DO_" & "VariableDomainName")


    Last edited by rickmeister; 09-25-2013 at 10:46 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,631

    Re: message box popup with variable

    Try:
    Set findRNG = sheetje.Range("B1").Find(What:=Trim(VariableDomainName) &"*Virtual")
    Ben Van Johnson

+ 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. Macro for Message Popup
    By bngguy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-27-2010, 02:24 PM
  2. Popup message
    By buckshot in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-07-2010, 05:26 PM
  3. Popup message box
    By Socrates in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 10-26-2009, 12:14 AM
  4. Message Box Popup with Yes or No
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-15-2008, 03:19 PM
  5. Enter variable into popup box, variable defines cell
    By invisible777 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2007, 06:31 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