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...
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...
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...
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...
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...
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...
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...
"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...
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 <>...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.