Hi Jarvonimbus,
If it's any help, I discovered my problem actually had to do with the incoming data and the code was fine. I think the data was in the wrong format or there were some blank spaces in there that I didn't realise - something like that.
Good luck!
Zwicky
Hi Ken,
Thanks for your reply.
The underscore is simply the way to continue the code on the next line. I tried taking it out just in case but no go.
CKey is what I've called the field in Excel whereas C Key is the name of the Pivot Field. They are not the same thing. I double checked the...
Hi There,
I have a problem with some code which causes a pivot table to change.
The strange thing is that the code worked fine until I updated the pivot table with some new data from Microsoft Access, all the names are the same but all of a sudden I get "Run-time error 1004: Unable to set the...
Thanks everyone,
I actually found another way of doing it which is to assign a cell link and use the value of that range as the reference instead. That worked fine.
Sorry, I didn't realise there was a vba forum...thanks for the tip!
Hi There,
Hopefully an easy one for someone...
What code do I use in Excel vba to do an if/then statement depending on whether an option button is checked or not?
My optionbutton is called "ob1" and it's in sheet "Vary".
I tried
If Sheets("Vary").Shapes("ob1").Value = True Then
But it gives...
Hi Everyone,
I am trying to change a pivot table name in excel vba code within a worksheet_change function
(Private Sub WorkSheet_Change(ByVal Target As Excel.Range)which does not allow you to use the select method for another worksheet.
I have tried...
I'm not sure what you mean.
The list that the user chooses from is simply a validated list refering to another worksheet with the names typed in. A vlookup changes the name to an id which is then concatenated with the others and this range is what is looked for in the pivot table field.
I had a...
I have a pivot table in Excel that references external data in Access. The pivot table is changed via a worksheet which acts as a user form. The user selects from a list and vba code causes the pivot table values to change. One of the selections consists of three consecutive lists which...
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.