+ Reply to Thread
Results 1 to 3 of 3

Amend code to check cell A2 has data in before running

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Question Amend code to check cell A2 has data in before running

    Hi,
    Can anyone please advise me of the change I need to make to the syntax of the following code
    to also check that there is data in cell ‘A2’ on the ‘Requests In Delivery (Data)’ tab


    If InputBox("Enter Password To Update Formulas") <> "go" Then

    MsgBox "Sorry Wrong password/No data in cell A2"
    Exit Sub

    End If

    So when the macro is run it will prompt the user for the password ‘go’ and also check to see if there is data in ‘A2’ on the ‘Requests In Delivery (Data)’ tab before continuing with the rest of the macro code


    Many thanks in advance for any assistance in this matter


    Regards


    Rob
    Last edited by robertguy; 12-11-2016 at 08:38 AM. Reason: grammar
    Rob

  2. #2
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Amend code to check cell A2 has data in before running

    May be
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Re: Amend code to check cell A2 has data in before running

    kasan,

    Excellent !! Many thanks for all you help it works as required

    Regards


    Rov

+ 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. [SOLVED] Amend Formula To Check if Cell ‘A2’ Has Data Entered
    By robertguy in forum Excel General
    Replies: 5
    Last Post: 12-01-2016, 07:36 AM
  2. [SOLVED] Go through each sheet and check a certain Cell value before running code...
    By spikedemike in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2015, 10:36 PM
  3. [SOLVED] Check if cell is empty before running code
    By cajand in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-26-2014, 03:01 PM
  4. Amend VBA Code to Clear Data
    By Renleff in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 09-26-2014, 04:15 PM
  5. [SOLVED] Macro code to amend the status of a cell to be a date
    By katieshields in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-31-2014, 10:00 AM
  6. VBA Code to check cell before running macro
    By kolovel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-17-2010, 06:19 PM
  7. Check cell for data before running code
    By Pat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-12-2005, 05:06 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