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...
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...
I'm using a bunch of command buttons to show and hide various sets of columns on a spreadsheet. I want the buttons to lock to the active part of the window and not the edge of the spread sheet. At the mo the just stick to the left edge of the spreadsheet and i want to be able to seee them as i...
What would be a standard way to return which button someone has pressed. I.E:
I have an OK/Cancel button and if the user presses OK the page is printed. How do i get there response so i can then do
(Code)
If response = OK Then
Sheet1.PrintOut
End If
Thanks.
Some of my macros that have been running fine for the last few months have stopped working rescently. I have worked out that it is because they now require .xls at the end of a filename where previoulsy they had not. I don't know what i have changed (nothing to my knowledge) but i am getting...
I want my formula to do the following:
lookup a value (staff number) on one sheet that contains all staff numbers and compare to another that only has some. If the number exists on both then return a value (costs) from the second sheet. If it does not exist on both then i want it to display...
Is it possible to return the number of rows the following code would select. The selection is then to be pasted into another sheet and i need the number of rows so that i can paste a formula, say in row B1 for the same amount of rows.
Range("A1").Select
Selection.Copy...
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.