Results 1 to 7 of 7

Macro just stops without any error message

Threaded View

  1. #1
    Registered User
    Join Date
    04-24-2012
    Location
    Bloomington, IL
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question Macro just stops without any error message

    Ok, this is my first post and I have to admit that I'm not very good at VBA but I can usually mess with things enough until I figure them out but this is one that I'm not having any luck with. A co-worker of mine actually created this macro and it runs fine. The only part that I added is the next to the last line - Sheets("building").Select

    But, when I add this line, it doesn't seem to run - the rest of the code runs but that part does not and, there is no error message - it just seems to treat that line like it is not even there. When I run just that line by itselft, it works fine. It just won't work as part of the larger macro. Any ideas what could be causing this?

    Thanks!
    Public Sub ClearAllFields()
    
        Worksheets("B.S.T.").Range("BusinessTypeRow").Value = 0
        Worksheets("B.S.T.").Range("ResultsReturnValue").Value = 0
        Worksheets("owssvr").Range("UserSelection").Value = 0
           
        Range("Table3").ClearContents
        
        Range("keyword").Select
        
      Worksheets("B.S.T.").Range("Keyword").Value = ""
        
        Worksheets("B.S.T.").Select
            Range("DatasetReturnArea").Select
            Selection.EntireRow.Hidden = True
            Range("Keyword").Select
            
    Sheets("building").Select
    
    End Sub
    Last edited by Paul; 04-24-2012 at 05:43 PM. Reason: Added CODE tags for new user. Please do so yourself in the future.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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