+ Reply to Thread
Results 1 to 12 of 12

macro notice

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    macro notice

    Hi to all.
    This macro in a network path, create 4 tables from a database:

    Please Login or Register  to view this content.
    it is possible that after the creation in active sheet:
    in B4 an alert appears:
    tables present if present
    tables not present if not present
    in C4 an alert appears:
    table SK1
    table SK2
    table SK3
    table SK4
    thanks in advance.
    max_max

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro notice

    Hi max_max,
    Sure, I would suggest that you do the import table table as Function and that returns a True or False if the table was created/imported correctly.
    Add a count ind if the count is equal to the tables then it's all true and you place the message in the cell saying that the tables were all created or not.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro notice

    Very difficult for me
    max_max

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro notice

    What is so difficult? You already have the macro

    Check the text in RED
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro notice

    Hi Keebellah
    Thanks for the change, I can not try the macro only tomorrow at the office.
    For the notice in the cell, that's okay?

    Please Login or Register  to view this content.
    max_max

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro notice

    No problem we'll hear it tomorrow.

    But you must learn to simplify your code do not add unnecessary lines

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro notice

    to try here at home in the counter I added your change to another macro.
    It gives error here:

    If Workbooks Is present Then contare = contare + 1

    undefined variable.
    max


    Please Login or Register  to view this content.

  8. #8
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro notice

    Dim Increase As Variant

    Dim contare As Integer

    Dim present As Object


    No error but no advise

    max_max

  9. #9
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro notice

    Sorry, I hoped you had a little more imagination.
    This is TEXT you have to enter the paramateters you use to check if the

    I do not know what the cells are and so
    If your text and fomula or code to check if true = True Then contare = contare +1

  10. #10
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro notice

    So I find out that they are present, without dim present as object

    Please Login or Register  to view this content.

  11. #11
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: macro notice

    I was just giving a tip, you found the right solution.
    Great.
    See, it's not that difficult after all

  12. #12
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: macro notice


    A greeting.
    max_max

+ 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. Security notice
    By Travissaw in forum Excel General
    Replies: 4
    Last Post: 06-08-2015, 04:04 AM
  2. Replies: 5
    Last Post: 10-08-2014, 08:04 AM
  3. countifS notice the 'S'
    By Eddiegnz1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-22-2014, 12:48 PM
  4. notice in a cell
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-11-2014, 08:08 AM
  5. Code to automatically enble/disable security notice for macro?
    By bigkahuna2187 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2012, 06:23 PM
  6. How to set up subscription due notice
    By slindon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-09-2006, 07:51 AM
  7. [SOLVED] Deadline Notice
    By roy.okinawa in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-27-2006, 06:40 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