Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bands Submit Private Sub btnSubmit_Click() Dim band As String

Similar presentations


Presentation on theme: "Bands Submit Private Sub btnSubmit_Click() Dim band As String"— Presentation transcript:

1 Bands Submit Private Sub btnSubmit_Click() Dim band As String
Dim Addr1 As String Dim Addr2 As String Dim Town As String Dim City As String Dim Postcode As String Dim Contact As String Dim Cost As Currency band = Me.txtBandName.Text Addr1 = Me.txtAddr1.Text Addr2 = Me.txtAddr2.Text Town = Me.txtTown.Text City = Me.txtCity.Text Postcode = Me.txtPostcode.Text Contact = Me.txtContact.Text Cost = CCur(Me.txtCost.Text) Sheets("Bands").Activate Range("A2").Select Do While IsEmpty(ActiveCell) = False ActiveCell.Offset(1, 0).Select Loop ActiveCell.Value = band ActiveCell.Offset(0, 1).Value = Addr1 ActiveCell.Offset(0, 2).Value = Addr2 ActiveCell.Offset(0, 3).Value = Town ActiveCell.Offset(0, 4).Value = City ActiveCell.Offset(0, 5).Value = Postcode ActiveCell.Offset(0, 6).Value = Contact ActiveCell.Offset(0, 7).Value = Cost Sheets("Menu").Select Unload Me End Sub Bands Submit

2 Venues Submit Private Sub btnVSubmit_Click() Dim Venue As String
Dim Addr1 As String Dim Addr2 As String Dim Town As String Dim County As String Dim Postcode As String Dim Phone As String Dim Max As Integer Dim Cost As Currency Venue = Me.txtVName.Text Addr1 = Me.txtVAddr1.Text Addr2 = Me.txtVAddr2.Text Town = Me.txtVTown.Text City = Me.txtVCounty.Text Postcode = Me.txtVPostcode.Text Phone = Me.txtVPhone.Text Cost = CCur(Me.txtVCost.Text) Max = CInt(txtVCapacity.Text) Sheets("Venues").Activate Range("A2").Select Do While IsEmpty(ActiveCell) = False ActiveCell.Offset(1, 0).Select Loop ActiveCell.Value = Venue ActiveCell.Offset(0, 1).Value = Addr1 ActiveCell.Offset(0, 2).Value = Addr2 ActiveCell.Offset(0, 3).Value = Town ActiveCell.Offset(0, 4).Value = County ActiveCell.Offset(0, 5).Value = Postcode ActiveCell.Offset(0, 6).Value = Phone ActiveCell.Offset(0, 7).Value = Max ActiveCell.Offset(0, 8).Value = Cost Sheets("Menu").Select Unload Me End Sub Venues Submit

3 Lighting Technicians Submit Private Sub btnLSubmit_Click()
Dim Company As String Dim Amount As Integer Dim Cost As Currency Company = Me.txtLCompany.Text Amount = CInt(Me.txtLAmount.Text) Cost = CCur(Me.txtLCost.Text) Sheets("Lighting Technicians").Select Range("A4").Select Do While IsEmpty(ActiveCell) = False ActiveCell.Offset(1, 0).Select Loop ActiveCell.Value = Company ActiveCell.Offset(0, 1).Value = Amount ActiveCell.Offset(0, 2).Value = Cost Sheets("Menu").Select Unload Me End Sub Lighting Technicians Submit

4 Sound Technicians Submit Private Sub btnSSubmit_Click()
Dim Company As String Dim Amount As Integer Dim Cost As Currency Company = Me.txtSCompany.Text Amount = CInt(Me.txtSAmount.Text) Cost = CCur(Me.txtSCost.Text) Sheets("Sound Technicians").Select Range("A4").Select Do While IsEmpty(ActiveCell) = False ActiveCell.Offset(1, 0).Select Loop ActiveCell.Value = Company ActiveCell.Offset(0, 1).Value = Amount ActiveCell.Offset(0, 2).Value = Cost Sheets("Menu").Select Unload Me End Sub Sound Technicians Submit

5 User form - Initialise Private Sub UserForm_Initialize()
Me.txtBandName.Text = "" Me.txtAddr1.Text = "" Me.txtAddr2.Text = "" Me.txtTown.Text = "" Me.txtCity.Text = "" Me.txtPostcode.Text = "" Me.txtContact.Text = "" Me.txtCost.Text = 0 Me.txtVName.Text = "" Me.txtVAddr1.Text = "" Me.txtVAddr2.Text = "" Me.txtVTown.Text = "" Me.txtVCounty.Text = "" Me.txtVPostcode.Text = "" Me.txtVPhone.Text = "" Me.txtVCost.Text = 0 Me.txtVCapacity.Text = 0 Me.txtLCompany.Text = "" Me.txtLAmount.Text = 0 Me.txtLCost.Text = 0 Me.txtSCompany.Text = "" Me.txtSAmount.Text = 0 Me.txtSCost.Text = 0 End Sub User form - Initialise

6 Clear Buttons Private Sub btnClear_Click() Me.txtBandName.Text = ""
Me.txtAddr1.Text = "" Me.txtAddr2.Text = "" Me.txtTown.Text = "" Me.txtCity.Text = "" Me.txtPostcode.Text = "" Me.txtContact.Text = "" Me.txtCost.Text = 0 Me.txtBandName.SetFocus End Sub Private Sub btnVClear_Click() Me.txtVName.Text = "" Me.txtVAddr1.Text = "" Me.txtVAddr2.Text = "" Me.txtVTown.Text = "" Me.txtVCounty.Text = "" Me.txtVPostcode.Text = "" Me.txtVPhone.Text = "" Me.txtVCost.Text = 0 Me.txtVCapacity.Text = 0 Me.txtVName.SetFocus Private Sub btnLClear_Click() Me.txtLCompany.Text = "" Me.txtLAmount.Text = 0 Me.txtLCost.Text = 0 Me.txtLCompany.SetFocus Private Sub btnSClear_Click() Me.txtSCompany.Text = "" Me.txtSAmount.Text = 0 Me.txtSCost.Text = 0 Me.txtSCompany.SetFocus Clear Buttons

7 Cancel Buttons Private Sub btnCancel_Click() Unload Me End Sub
Private Sub btnVCancel_Click() Private Sub btnLCancel_Click() Private Sub btnSCancel_Click()


Download ppt "Bands Submit Private Sub btnSubmit_Click() Dim band As String"

Similar presentations


Ads by Google