Search results

  1. Tark221

    Specific sheet input

    Private Sub CommandButton1_Click() Dim iRow As Long Dim ws As Worksheet Dim xlApp As Object Set xlApp = CreateObject("Excel.Application") xlApp.Workbooks.Open ("\\henry\LiddlM1\AIP\Teamtool.xls") Set ws = xlApp.ActiveWorkbook.Worksheets(ComboBox3) s.Select Hmnmm getting type mismatch error on...
  2. Tark221

    Private Sub CommandButton1_Click() Dim iRow As Long Dim ws As Worksheet Dim xlApp As Object Set...

    Private Sub CommandButton1_Click() Dim iRow As Long Dim ws As Worksheet Dim xlApp As Object Set xlApp = CreateObject("Excel.Application") xlApp.Workbooks.Open ("\\henry\LiddlM1\AIP\Teamtool.xls") Set ws = xlApp.ActiveWorkbook.Worksheets(ComboBox3) s.Select Hmnmm getting type mismatch error on...
  3. Tark221

    Specific sheet input

    I took the file name out and left in the folder i will show u xlApp.Workbooks.Open ("\\henry\LiddlM1\AIP") Just to see if it worked now it says this hmm lol is this worst ! :P Excel cannot access 'AIP'. The document may be read - only or encrypted
  4. Tark221

    Specific sheet input

    Private Sub CommandButton1_Click() Dim iRow As Long Dim ws As Worksheet Dim xlApp As Object Set xlApp = CreateObject("Excel.Application") xlApp.Workbooks.Open ("\\henry\LiddlM1\AIP\Individualstaffsheet2") Set ws = xlApp.ActiveWorkbook.Worksheets(Me.ComboBox3) s.Select It's not liking tht line...
  5. Tark221

    Specific sheet input

    what if the workbook is already open? does this still need to be in there?
  6. Tark221

    Specific sheet input

    Thanks Bob It's now saying Object variable or With block variable not set and its highlighting this sentence, the one in orange Private Sub CommandButton1_Click() Dim iRow As Long Dim ws As Worksheet Dim xlApp As Object Set xlApp = CreateObject("Excel.Application") Set ws =...
  7. Tark221

    This is weird and confusing

    Private Sub delete_Click() staffName = DelF.ComboBox3 Sheets(staffName).Select ActiveWindow.SelectedSheets.delete End Sub This is my code - there is some code which i havent pasted which dependant on what you pick in drop down 1 depends what you get in drop down 2...
  8. Tark221

    Specific sheet input

    Thanks Trevor for the reply Private Sub CommandButton1_Click() Dim iRow As Long Dim ws As Worksheet Dim xlApp As Object Set xlApp = Set ws = xlApp.ActiveWorkbook.Worksheets(Me.ComboBox3) ws.Select Is this looking better? So i've put xlApp as the object - Dim xlApp As Object Now do I need to...
  9. Tark221

    Specific sheet input

    hey Bob thanks for the reply so at the moment thanks to your input im not using this code: Private Sub CommandButton1_Click() Dim iRow As Long Dim ws As Worksheet Set ws = xlApp.ActiveWorkbook.Worksheets(Me.ComboBox3) ws.Select Buti it's returning object required, am i missing something?
  10. Tark221

    Specific sheet input

    Private Sub CommandButton1_Click() Dim iRow As Long Dim ws As Worksheet ws(Me.ComboBox3.Value).Select End Sub Would it not be as simple as tht bit of code but it didnt work, i did try your code and played about with it but cudnt get tht to work either any suggestions? Thanks for the reply btw
  11. Tark221

    Specific sheet input

    Just a brief summary: I have 2 forms: One form is for adding new staff to a spreadsheet, the form creates a new spreadsheet and renames the sheet based on the staff name - this works fully The second form is to add absences to a staff member, the problem I'm having is I need the data to input...
  12. Tark221

    Data input help

    Ah thanks for the reply Is there a way to enter the data in a specific row?
  13. Tark221

    Populating drop down boxes again

    I some how manage to solve my own questions bah, sorted it
  14. Tark221

    Populating drop down boxes again

    Private Sub ComboBox1_Change() 'If Candice is picked in box one then 'her team will populate box to the right Me.ComboBox3.Value = "" If Me.ComboBox1 = "Candice Smith" Then Me.ComboBox3.RowSource = "=Smith" Me.ComboBox3.Value = "" End If End Sub This works but how would i say add other...
  15. Tark221

    Data input help

    When submitting the data into the newly created spreadsheet for some reason it's entering it into row 14 i thought this code made it so it entered it in the next free row which would make it the second row down from the top Dim iRow As Long 'find first empty row in database iRow =...
  16. Tark221

    Another question

    When submitting the data into the newly created spreadsheet for some reason it's entering it into row 14 i thought this code made it so it entered it in the next free row Dim iRow As Long 'find first empty row in database iRow = ws.Cells.Find(What:="*", SearchOrder:=xlRows, _...
  17. Tark221

    Another question

    Though I've managed to get the code to also enter the data from the text boxes into the spreadsheet after its made so yay! Private Sub CommandButton4_Click() Dim ws As Worksheet ActiveWorkbook.Sheets("Template").Copy After:=Sheets(Worksheets.Count) Set ws = Sheets(Sheets.Count) If...
  18. Tark221

    Another question

    Thank you, dam I was no where near !
  19. Tark221

    Another question

    Private Sub CommandButton4_Click() Dim ws As Worksheet Set ws = ActiveWorkbook.Sheets("Template").Copy If Len(AddStaff.TextBox1 & vbNullString) > 0 Then ws.Name = AddStaff.TextBox1 End If End Sub Ive been working with this. I have a worksheet called Template which is the one i want to copy...
  20. Tark221

    Another question

    ooo good tip I will work at this for abit thanks boblarson
Back
Top Bottom