View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Mike is offline
external usenet poster
 
Posts: 3,101
Default summarising information in a workbook on a new worksheet

Private Sub CommandButton1_Click()
Dim strColumn1 As String
Dim strColumn2 As String

strColumn1 = "A1"
strColumn2 = "B1"

Worksheets("sheet1").Range(strColumn1).Value = Me.TextBox1.Value

Worksheets("sheet1").Range(strColumn2).Value = Me.TextBox2.Value

UserForm2.Hide

End Sub

Private Sub UserForm_Activate()
Dim StartDate As String
Dim EndDate As String

StartDate = "Enter a Starting date...Example 1/1/2007"
EndDate = "Enter a Ending date..Example 1/1/2007"

MsgBox StartDate & vbCrLf & EndDate

End Sub

"SDH" wrote:

i have a worksheet that details the sales to customers. From a userform i
need a command button to open a form that asks for start and finish dates.
These dates need to be used to show all the sales made in this period and be
displayed on a new worksheet