+ Reply to Thread
Results 1 to 2 of 2

[SOLVED] If a file exists then do this...

  1. #1
    hshayh0rn
    Guest

    [SOLVED] If a file exists then do this...

    I need some help with code to do the following:

    If a file like: BankNumber & "-Cost Centers.xls" exists in the directory
    we're currently using THEN

    useform.field_the_the_form.visible = False

    BankNumber is defined as a string and is a dynamic part of the file name.

    Also, where should this appear within my code? Should it be it's own module
    or can it be right on the userform I'm munipulating the fields based on
    whether or not the file exists?

  2. #2
    hshayh0rn
    Guest

    RE: If a file exists then do this...

    I have to reivse this post... The value of Banknumber is not known at the
    time I need the fields to be determined as visible or not. So.... the second
    part of the file name is constant can we use a LIKE statement to determine if
    the file exists instead?

    "hshayh0rn" wrote:

    > I need some help with code to do the following:
    >
    > If a file like: BankNumber & "-Cost Centers.xls" exists in the directory
    > we're currently using THEN
    >
    > useform.field_the_the_form.visible = False
    >
    > BankNumber is defined as a string and is a dynamic part of the file name.
    >
    > Also, where should this appear within my code? Should it be it's own module
    > or can it be right on the userform I'm munipulating the fields based on
    > whether or not the file exists?


+ 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