Results 1 to 7 of 7

Thread: How do I check to see if a sheet is present?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2001
    Posts
    122

    How do I check to see if a sheet is present?

    Hi,

    In excel 97, I need to check if a sheet called 'Template_Info' is present. If it isnt then a messagebox saying that is needed. if it is, then I have a procedure which I need to put afterwards which checks some values in the sheet.

    Any help on this will be greatly appreciated.

    Regards
    Paul
    -------------------------------------

    ICQ: 44712087 (evenings only)
    Email: [email protected]

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    VB Code:
    1. Dim i As Integer
    2.     Dim bTemplInfSheetExist As Boolean
    3.     For i = 1 To Application.Sheets.Count
    4.         If Application.Sheets(i).Name = "Template_Info" Then
    5.             bTemplInfSheetExist = True
    6.             Exit For
    7.         End If
    8.         'MsgBox Application.Sheets(i).Name
    9.     Next i

    something like that ?
    -= a peet post =-

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2001
    Posts
    122
    that works great! thanks a lot

    btw.... if i wanted you for technical help, how much would you charge??
    -------------------------------------

    ICQ: 44712087 (evenings only)
    Email: [email protected]

  4. #4
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629


    your welcome.

    It would depend on type of work, amount of work....

    well this is free, so maybe posting problems here are the best way to get help
    -= a peet post =-

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Sep 2001
    Posts
    122
    well basically, ive been taken on as a modern apprentice by EDS. Im doing data manipulation with VBA in access and excel. Although Ive learnt basic VBA, theres still stuff I dont know..... so I need someone to ask for help.

    I think ill just post questions here, as they seem to get answered very quickly

    Thanks a lot
    Paul
    -------------------------------------

    ICQ: 44712087 (evenings only)
    Email: [email protected]

  6. #6
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Yes, there are tons of people with good skills in here, and they do tend to compete in getting a fast and good solution for those who ask. Never seen any better forums
    -= a peet post =-

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Sep 2001
    Posts
    122
    dunno what laguages u know, but if you want something to do (lol) then heres a personsal request


    http://www.vbforums.com/showthread.p...hreadid=101430


    paul
    -------------------------------------

    ICQ: 44712087 (evenings only)
    Email: [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width