+ Reply to Thread
Results 1 to 2 of 2

Trouble with an application code

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    canada
    MS-Off Ver
    Excel 2010
    Posts
    1

    Trouble with an application code

    Sub HideRows()

    Dim tempRange As Range

    Application.ScreenUpdating = False
    Application.StatusBar = "Please wait ..., Inventory Sheet being shrunk !"

    Set tempRange = Range("AA1").Offset(1)
    While tempRange.Cells(1, 1).Value <> "end"
    If tempRange.Cells(1, 1).Value <> "." Then
    tempRange.EntireRow.Hidden = True
    End If
    Set tempRange = tempRange.Offset(1)
    Wend

    Application.ScreenUpdating = True
    Application.StatusBar = False

    MsgBox "Done !! Have a good day.", vbOKOnly, "Shrink Inventory Template"

    End Sub

    I use this as a button to hide rows when there value is zero or blank, was working fine up until today, now im getting an error on this line "While tempRange.Cells(1, 1).Value <> "end""


    I am getting "." left in the cell for some reason and cant figure out why please help

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Trouble with an application code

    Hi and welcome to the board. Unfortunately

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

+ 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