Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

User form delete button that can delete mutiple rows on multiple sheets Excel 2010

$
0
0

hello all, I am using the code below to clear my multi page main form but I would like to be able to clear all forms and all sheets with one button.  the main form will never have more than on row (its a single request form) but the sub forms that use sheet 2, sheet 3 can have multiple rows.

Private Sub cmdClearForm_Click()
  Dim smessage As String
    smessage = "Are you sure you want to Clear the main form data, this action will clear all tabs"
    If MsgBox(smessage, vbQuestion + vbYesNo, _
              "Confirm Delete") = vbYes Then
             Rows(lCurrentRow).Delete
    End If
     Unload Me
     fmStage1BA.Show
     LoadRow
End Sub

thanks


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>