Problem with Excel InputBox Method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • coztim
    New Member
    • Jan 2010
    • 2

    Problem with Excel InputBox Method

    Im trying to run a very simple macro to allow a user to select a range of rows for deletion. It works fine as long as the commandbutton is on the same screen as the selected cells. If the user selects a range of cells where the commandbutton scrolls off the screen... it doesn't work. Any thoughts?

    Private Sub CommandButton1_ Click()
    Dim DeleteRange As Range
    On Error Resume Next

    Set DeleteRange = Application.Inp utBox(Prompt:=" Select Row(s)", Type:=8)

    DeleteRange.Ent ireRow.Delete

    End Sub
  • coztim
    New Member
    • Jan 2010
    • 2

    #2
    I think I figured out the cause. I guess there is a bug in Excel 2003 and older where the InputBox method returns an error if there are any cells in the sheet which contain conditional formatting.

    Question is... Is there a workaround for this?

    Comment

    Working...