Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
summarising information in a workbook on a new worksheet
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
summarising information in a workbook on a new worksheet
Thank Mike, but perhaps i didn't explain the function required correctly. So
here is a bit more detail. I have a UserForm1 with a cmdUpdateSummary button on it. The Workbook has two sheets Products and Clients. The Clients sheet has a list of details of sales made with the date of sales in column F. What i need is when the cmdUpdateSummary is clicked to ask for the start and finish date of sales to report in a new worksheet 'Summary' with all those details of the dates that meet the criteria to be presented. "Mike" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding a Workbook based on a Cell information in another Workbook | Excel Worksheet Functions | |||
Summarising information from different sheets in a summary sheet | Excel Worksheet Functions | |||
Summarising Worksheet Data | Excel Programming | |||
Moving Cell Information from one workbook into another workbook | Excel Worksheet Functions | |||
Summarising Information from other files | Excel Discussion (Misc queries) |