Visual Basic Question

I have the following formula that I use in visual basic to update a
pivot table from a pivot table.  I want to alter the formula to update
a pivot table from a set of data (that was brought in from a query to
excel).  How do I alter my formula below?

         Sheets("Commissions").Select
        ActiveSheet.PivotTableWizard SourceType:=xlPivotTable,
SourceData:= _
           "[Munge_Report.xls]Data!Query"

0
lj1 (84)
11/21/2005 7:09:07 PM
excel 39879 articles. 2 followers. Follow

2 Replies
295 Views

Similar Articles

[PageSpeed] 37

Posted to Programming to get a faster reply.

"lj" <lj@spu.edu> wrote in message 
news:1132600147.868091.262230@g14g2000cwa.googlegroups.com...
>I have the following formula that I use in visual basic to update a
> pivot table from a pivot table.  I want to alter the formula to update
> a pivot table from a set of data (that was brought in from a query to
> excel).  How do I alter my formula below?
>
>         Sheets("Commissions").Select
>        ActiveSheet.PivotTableWizard SourceType:=xlPivotTable,
> SourceData:= _
>           "[Munge_Report.xls]Data!Query"
> 


0
reply6075 (299)
11/22/2005 12:49:16 AM
Why not turn on the macro recorder and try to perform the action manually.
That should give you code specific to your situation.

-- 
Regards,
Tom Ogilvy

"Barb Reinhardt" <reply@tonewsgroup.com> wrote in message
news:eZoWS6v7FHA.2012@TK2MSFTNGP14.phx.gbl...
> Posted to Programming to get a faster reply.
>
> "lj" <lj@spu.edu> wrote in message
> news:1132600147.868091.262230@g14g2000cwa.googlegroups.com...
> >I have the following formula that I use in visual basic to update a
> > pivot table from a pivot table.  I want to alter the formula to update
> > a pivot table from a set of data (that was brought in from a query to
> > excel).  How do I alter my formula below?
> >
> >         Sheets("Commissions").Select
> >        ActiveSheet.PivotTableWizard SourceType:=xlPivotTable,
> > SourceData:= _
> >           "[Munge_Report.xls]Data!Query"
> >
>
>


0
twogilvy (1078)
11/22/2005 4:25:08 AM
Reply:

Similar Artilces:

OWA questions #2
A couple of questions I am having problems find the answers to: 1. Is there an easy way to change OWA to be at http://localhost instead of http://localhost/exchange 2. Is there an easy way to change OWA so that the domain name is not required when logging on (as though it is automatically passed)? 3. Are there any good, free, mailbox-to-web archivers out there? Thanks in advance 1. There are a few ways to have it where users type in http://<server>/, and get redirected to http://<server>/exchange. The easiest way is to do a redirection through the IIS console. The followin...

Stupid question
I've an XML document that has HTML data inside one of the tags (with < & > encoding as &lt; etc) I'm Transform()ing the document using output method="html", but I get the &lt; encoding instead of < > and friends. How do I make this work? If I just throw the HTML data (it's well formed) to the document and select the containing node's contents I get the text without any HTML Formatting. If I encode it using &lt; I get the same &lt; as I put in, instead of reversing it to < If I put it in a CData (using < & > OR &lt;) I g...

Word 2007
In Word 2007, I adjust the text wrapping around a picture by right-clicking on the picture and then choosing Format Picture, Layout, Advanced, Through. I'll be very grateful to anyone who can tell me the Visual Basic code for this. Mary Fetsch On Mon, 31 May 2010 15:27:01 -0700, Mary Fetsch <MaryFetsch@discussions.microsoft.com> wrote: >In Word 2007, I adjust the text wrapping around a picture by right-clicking >on the picture and then choosing Format Picture, Layout, Advanced, Through. >I'll be very grateful to anyone who can tell me the Visual Basi...

Human Resources Questions
In the orientation piece of HR, if we click notify payroll button, the report doesn't print anything. You mean the report is completely blank? -- Charles Allen, MVP "jcschram" wrote: > In the orientation piece of HR, if we click notify payroll button, the report > doesn't print anything. > > I believe that it had a heading and date and that was it. "Charles Allen" wrote: > You mean the report is completely blank? > -- > Charles Allen, MVP > > > > "jcschram" wrote: > > > In the orientation piec...

A few MVVM and Entity Framework questions
I've been out of the .NET game for a few years now [pre 2005] and starting a little project using the Entity Framework and WPF. My understanding is that the MVVM pattern is the way to go nowadays, but I've got a few questions. This is a purely made up example, so forgive any UI design quirks, and I'm leaving out a bunch of code just as the INotifyPropertyChanged stuff. 1. Let's say I've got a heavy-ish model class called Report. I'd like to create a Report browser type of viewer. I'd like the browser to have a combobox / listbox / treeview / something ...

Advanced Charts Question
I'm moving and application from Excel to Access. In Excel there are stacked bar charts that show prior years End of Year Summary information along with Monthly summarized data for current year. There's also a target line that runs the width of the chart connecting last year's EOY bar with current year's final target value. To complicate everything, the charted values are in Parts Per Million. In Excel I just added columns for the Historical Annual data to the left of the monthly columns, and a column to the right for the final target value. I also added a row for the target va...

Batchfile substitution syntax question
I want the my bacthfile code to produce (including the spaces): copy /y "c:\this dir\this file.txt" d: copy /y "c:\next dir\next file.txt" d: copy /y "c:\last dir\last file.txt" d: Instead, I just get code with the set var names; copy /y "c:\x1" d: copy /y "c:\x2" d: copy /y "c:\x3" d: How do I correct my "c:\x%%a" substitution syntax in the following code to produce the correct copy stmt? @echo off set x1=c:\this dir\this file.txt set x2=c:\next dir\next file.txt set x3=c:\last dir\last file.txt f...

Save Function and Macro Question
Some of my worksheets will ask me if I want to save upon exit even when I make no changes, and some don't. I believe it has something to do with a prior link that has been deleted. Also, a similar situation, upon opening a worksheet, the "macro warning" window comes up even though I have no macro. I started to write a macro and then deleted it. I still get the warning. These are just annoying. Some functions in excel are "volatile", they will re-calculate every time excel is opened, this will make the worksheet change even if you don't make any changes. Here are ...

How do I view cell text without it visually hiding other cells?
When I key on text in a cell to edit information in a template sent to me, the cell display pops out visually blocking other cells with information. How can I change the display to allow me to double click the cell and then enter information, without the cell display being so enlarged - using excel 2000. Don't double click, edit the cell in the formula bar. -- _______________________ Naz, London "ldmci" wrote: > When I key on text in a cell to edit information in a template sent to me, > the cell display pops out visually blocking other cells with informatio...

Internet Explorer 6 Question
I know this is not the right newsgroup, but I am having problems with IE 6 opening links. It's not loading the pages. Does anyone know a group that could answer my question? Thank you. Ignore it. I've found a solution: http://www.anetforums.com/posts.aspx?ThreadIndex=3330 "WithoutAClue" <questioner@spam.com> wrote in message news:nykdd.4120$Cb5.31547@newscontent-01.sprint.ca... > I know this is not the right newsgroup, but I am having problems with IE 6 > opening links. > > It's not loading the pages. > > Does anyone know a group that cou...

Overpayment adjustment on loans & other questions
MS Money 2004 Premium Windows XP SP1 Problem 1) When creating a student loan in my debt reduction planner, I go through the wizard, setting the amount of the loan, interest, term of loan, payment amount & frequency. That all goes fine, but I have an overpayment adjustment I need to make that occured before my first payment due date. Unfortunately, money will not allow me to add the adjustment because it only manages the account starting on the date of the first payment. The adjustment goes 100% to the principal, and thusly affects the interest significantly, so that my whole plan is wa...

Two questions
1. Is there a way to make a header show only on page one? 2. I have a column that shows the grades students are in. I usually sort them by grade, but use K for kindergarten, so kindergarten always comes up at the end of the list, instead at the beginning where I want them. I need them to print out as K. Is there a way to make K = 0? If so, I would rather do this than label them all as 0 and have to change it to K when I print out my list. Thank you. B.Kundla 1. If it only appears on one page, it's not really a header. Just place it in the top of your worksheet (I use textboxes...

Copy over files/replace (complete question)
Cat walked over keyboard and actually sent the previous post uncomplete so here it is complete..thansk for reading. I have a lot of files on cd/dvd that i am moving into one folder on my hdd so i can sort them out before reburning them. However there are quiet a few mp3 files that have the same name etc but because i converted these at a higher bit rate they are larger in size, whilst moving them to the folder i keep getting the "would i like to replace the existing file" and have to click either yes or no. Its a pain ...so is there anything out there or anything i can do , that w...

Simple Exchange Question
Let me start by saying that I know almost nothing about Exchange Server or how to set anything up. All I really know is how to go into Active Directory Users and Groups and review information and add SMTP addresses. I'm not a networking guy at all. We're a small three man company and we're in the middle of switching our IT support, so I figured I'd ask this question here because I'm hoping it's very simple. I want to set up email addresses that get forwarded to multiple people. For instance, I want to set up support@mydomain.com. Whenever an email is sent to that...

Bitmap Question???
Here is image buffer array called: OrigData[]; CBitmap bmp; bmp.CreateBitmap(256, 360, 1, 8, (const void*)OrigData); BITMAP bm; bmp.GetBitmap(&bm); Then I found something unexpected: the address of OrigData does not equal to the address of bm.bmBits Why? Can anybody help me explain the reason??? AND what should I do if I wanna create a bitmap from image data array in memory by CBitmap???? Thanks very much!!! Couple of things: First of all, the call to CreateBitmap is asking the system to create a bitmap handle, internally. The system isn't going to g...

Question about Excel/Word 2000 Privacy
I know there was a NIC fingerprint embedded in office 97 document and it had been removed in office 2000. Now, does an exel/word 2000 document contain the information of my "user name"? The user name can bet set by Tools-->Options-->General-->User name or the User information tab in Word. If I send my document to my friend and he modifies it, will my user name still in the document? thanks! invalid, >Now, does an exel/word 2000 document contain the information of my "user >name"? Application.UserName gives you the name of the User who has the workbook...

Newbie question
Hi - How do I total a column of hours and minutes. I've tried =sum(a1:a5) but it give me less than the total time. Thanks - Dave --- David Scott Hampshire, England Hi, Dave. you need to format that sum cell as [h]:mm See: http://www.officearticles.com/excel/adding_or_summing_time_in_microsoft_excel.htm ************ Anne Troy VBA Project Manager www.OfficeArticles.com "Dave S" <cadasco@SUPERhotmail.com> wrote in message news:3thrh8Fssb55U1@individual.net... > Hi - How do I total a column of hours and minutes. I've tried =sum(a1:a5) > but it give me less t...

Lookup and Match question.
Hello, I was wondering if someone could assist me. I tried figuring this out with a Index and Match formula but cant get it to work. Using the example below, I'm trying to put a formula in Column E that will let me know if there is anything scheduled for an agent in column D that matches the time in column B and if so place the time from column D into the cell in E else leave it blank. The list of agents and amount of rows each agent will have, will vary from day to day. Example layout A B C D E Agent Shift Start Availa...

[ANN] ActiveState Releases Visual XSLT 2.0
ActiveState is pleased to announce the release of Visual XSLT 2.0. This release is a major upgrade from Visual XSLT 1.8, adding powerful new features to the complete XSLT development plug-in for Visual Studio .NET. New in Visual XSLT 2.0 * Just-In-Time (JIT) Debugging - Test XSLT code embedded in other applications or libraries built for the Microsoft .NET Framework. No need to provide any source code at all -- not for the application, not for the XSLT, not for the input. * Visual Schema Mapper - Visually generate XSLT-driven XML-to-XML transformations * Enhanced Project Mana...

MFC Newbie Question
I created an SDI application using the wizard. The view class is derived from CEditView. I want a pointer to my view class to call some member functions. So I added a member variable to the App class that was a pointer of type View. After doing this, I get compiler errors C2143 and C2501 in the header file of my view class where it declares the GetDocument(); function. I think I've got some kind of circular reference thing going on here but am missing something simple. class CTest2App : public CWinApp { public: CTest2App(); CTest2View* theView; // This is what I added snip }; ...

Odd question about .pst's and journaling..
I have setup journaling on my server and send out to a third party archiving solution and it works like a champ. My question is this, if I have users with older .pst's that I would like to get journaled/archived is there any way to do it? I was trying to figure something out but didn't really see a good way to preserve the integrity of the message as it would most likely have to run through the exchange engine again, be categorized again, stamped with a new header, etc., et., Anyway, if there's anything out there that can take a .pst and get it into my journal I'd love...

Re: H E L P * * * Need help with question about protecting a range of cell in workbook
I need to know how to protect a range of cell/s in a workbook ...

VCalendar Parsing Question
This is dumb. I'm trying to think of a way to parse continued lines in a VCalendar file. The only indication that a line such as a description or a summary continues on the next line is that the next line begins with a space. I guess I'm just thick-headed today but I can't think of a good and fast way to add the following line to the previous line without loading the entire file as a blob instead of as a line input. A typical series of lines looks like this: BEGIN:VEVENT SUMMARY:Emancipation Proclamation UID:2008-05-08-11-02-18-63-@americanhistorycalendar.c...

Visual Tools for GP 9.0 SDK Install error
I get an error when trying to install the Visual Studio Tools for Microsoft Dynamics GP SDK 9.0. "Requires Microsoft Visual Studio 2005" I've got Visual Studio 2005 Professional installed, from MSDN. Does anyone have any ideas? Thanks, Steven Vallarian > I get an error when trying to install the Visual Studio Tools for > Microsoft Dynamics GP SDK 9.0. > > "Requires Microsoft Visual Studio 2005" > > I've got Visual Studio 2005 Professional installed, from MSDN. Does > anyone have any ideas? > I didn't ever figure out why the message ...

Tags Summary Question/Problem
I have finally gotten my Tags organized in a meaningful way and am applying them effectively. When I go to the Tags Summary I notice that Onenote is sorting my tags in alphabetical order. When I create a to do list with check boxes I put the tasks that are outstanding in the order that they need to be done. When I check the Tags Summary the alpabetized sort takes all my tags that are in the right order and destroys the organization. What happens is the Tag Summary and Create Summary Page is undoing all my work and renders the Summary useless (at least it does for me). Can I ...