Results 1 to 5 of 5

Thread: How to Disabled a Command AFTER the last row is inserted.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Apr 2018
    Posts
    50
    Location

    How to Disabled a Command AFTER the last row is inserted.

    using MS excel 2010
    win.7

    i want the commandbutton to be disabled after max rows displayed. if that is even possible. i attached my workbook.


    This my vba code:
    Option Explicit
    Private Sub CommandButton1_Click()
    Dim pass As String
    pass = "nh1234"
    ActiveSheet.Protect Password:=pass, UserInterFaceOnly:=True


    With Range("A17:A42").SpecialCells(xlVisible).Areas(1)
    With .Offset(.Count).Resize(1)
    .EntireRow.Hidden = False
    .Offset(, 1).Select
    End With
    End With
    End Sub
    Attached Files Attached Files
    Last edited by Ladyj205; 06-20-2018 at 09:21 AM.

Posting Permissions

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