Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Westicle
  • Order by date
  1. Westicle

    ComboBox.Clear unspecified error

    PH your right - i added this and it sorted it AnalCodesUF.JobNumberCB.RowSource = "" Thanks for your help guys. Westy.
  2. Westicle

    ComboBox.Clear unspecified error

    Goeff - yeah it says: Run Time Error - -2147467259(80004005) Unspecified error PH the first time the procedure is called by a button the user clicks to open the form, the second time it's called when they click a button to submit any changes they've made. The RowSource isn't set because the...
  3. Westicle

    ComboBox.Clear unspecified error

    woops my mistake. AnalCodesUserForm.JobNumberComboBox.Clear - this should be AnalCodesUF.JobNumberCB.Clear Interesting links.
  4. Westicle

    ComboBox.Clear unspecified error

    I have a combobox on a userform that is populated according to the code below The user then makes adjusments to certain entries - the code is then re-run to produce a new list with the corrected entry removed. To do this I use the following: AnalCodesUserForm.JobNumberComboBox.Clear When the...
  5. Westicle

    array lookup type mismatch

    Yeah that works great. Thanks, Westicle.
  6. Westicle

    array lookup type mismatch

    I assume it's not compatible because they are both z. I do not know how to refer to each item in an array? Is there a keyword?
  7. Westicle

    array lookup type mismatch

    I'm getting a type mismatch (at the line with lookup function) in the following section of code: Dim JobArray(1 To 85, 1 To 2) As String Set JobSource = Worksheets("Data").Range("A:P") 'Populate the array with all the job numbers x = 0 y = 1 'so the 1st cell looked at is...
  8. Westicle

    rowsource type mismatch

    That works perfectly. Thanks for your help PH. Westicle.
  9. Westicle

    rowsource type mismatch

    I don't get a type mismatch now but it's picking up the range on the active sheet and not the sheet i'm specifying.
  10. Westicle

    rowsource type mismatch

    Sorry to ask a quesion I know has been answered before but I can't find it. I get a type mismatch with the following code. Sub GetData() UserForm1.ComboBox1.RowSource = Worksheets("Sheet1").Range("A1:A10") End Sub If I just use RowSource "A1:A10" then it works fine but I need to say...
  11. Westicle

    Error handling 1st go

    Works beautifully thanks. 2 more questions and then i'll leave you in peace. Does it have to be called ErrorHandler? - I got that from VBA help in Excel. Is the general idea that you know some errors may occur so you counter for them in the error handler and do you always do this by saying If...
  12. Westicle

    Error handling 1st go

    Thanks guys I get it!! I didn't know what this sentance meant "your code falls thru the ErrorHandler" If I run it using the way Frederico says then the code all runs fine but I still get the msgbox saying "some other error" - I thought this was because there WAS another error occuring but if I...
  13. Westicle

    Error handling 1st go

    So it should look like this: Declare variables Sub RunCode() Some code Error check Some code End Error check Some code ErrorHandler End Sub
  14. Westicle

    Error handling 1st go

    Option Explicit Dim FlexSource As Range Dim NumberCheck As Variant Dim StaffNumberRow As Long 'Variables relating to Personal Info Dim StaffNumber As Long Dim FirstName As String Dim Surname As String Dim Grade As Integer Dim DOB As Date Dim FullOrPartTime As String 'Variables relating to...
  15. Westicle

    Error handling 1st go

    "you NEVER execute the code AFTER the error routine" is that a question or a statement - are you saying there should not be any code after the error handler? Like I said i'm an Error newbie. I tried replacing this - 'Lookup employee personal details (for identification) and put on to form...
  16. Westicle

    Error handling 1st go

    Sub Lookup_Click() Set FlexSource = Worksheets("Data").Range("A8:IV60000") StaffNumber = StaffNumberTB.Value On Error Resume Next NumberCheck = Application.WorksheetFunction.VLookup(StaffNumber, FlexSource, 1, False) If Err.Number <>...
  17. Westicle

    Error handling 1st go

    It still does the same. It seems as though even if there is no error it runs the second case and stops the code there.
  18. Westicle

    Error handling 1st go

    Thanks Skip. But now it doesn't generate an error but doesn't continue with the code afterwards either?
  19. Westicle

    Error handling 1st go

    Hi I'm having a go at handling errors for the first time and having trouble. What I am doing is looking up a staff number (entered on a userform) on a spreadsheet. If the staff number doesn't exist then this works fine, however if the staff number does exist it still picks up an error even...
  20. Westicle

    List Box AddItems problems

    Hi Y'all I am having trouble adding items into a list box (from a spreadsheet). I can add a single item fine but I am stumped as to how i can have more columns. The List box is detailing a company car history of drivers - column 1 is name, 2 is start date, 3 is end date. This is what I have got...

Part and Inventory Search

Back
Top