+ Reply to Thread
Results 1 to 1 of 1

Add data into textbox with Getpivotdata-function

  1. #1
    Registered User
    Join Date
    05-08-2017
    Location
    Vaasa, Finland
    MS-Off Ver
    2010
    Posts
    1

    Add data into textbox with Getpivotdata-function

    Hello!

    The TextBox5 value needs to be taken from PivotTable (on Sheet SUO!F2). Value in Combobox1 act as a "filter" for all textbook (2-5) values.
    Other Textbox- values work okay, so the problem is this line

    TextBox5.Text = pvtTable.GetPivotData("Sum", SUO!F2, "NRO", ComboBox1).

    If I insert GetPivotData-function on Excel- sheet (instead of combobox1 I use of course the right reference), it works. So I'm doing something wrong in VB...

    I am pretty new and preciate your help.

    Private Sub CommandButton1_Click()
    row_number = 0
    Do
    DoEvents
    row_number = row_number + 1
    item_in_review = Sheets("LAS").Range("B" & row_number)
    If item_in_review = ComboBox1.Text Then
    TextBox2.Text = Sheets("LAS").Range("A" & row_number)
    TextBox3.Text = Sheets("LAS").Range("D" & row_number)
    TextBox4.Text = Sheets("LAS").Range("C" & row_number)

    TextBox5.Text = pvtTable.GetPivotData("Sum", SUO!F2, "NRO", ComboBox1)

    TextBox7.Text = Date


    End If
    Loop Until item_in_review = ""

    End Sub
    Last edited by Viivi; 05-08-2017 at 07:30 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Extract data from a pivot table using GETPIVOTDATA function
    By Philangr8 in forum Excel General
    Replies: 1
    Last Post: 10-30-2015, 04:00 PM
  2. [SOLVED] Function GETPIVOTDATA
    By Saturn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-13-2015, 07:13 AM
  3. [SOLVED] GETPIVOTDATA – How to force getpivotdata to accept missing data
    By scottc_00 in forum Excel Formulas & Functions
    Replies: 39
    Last Post: 02-11-2015, 03:23 PM
  4. Extracting data from pivot table using getPivotData function
    By shantanuk in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 12-24-2012, 08:20 AM
  5. Function within GETPIVOTDATA
    By trendkill in forum Excel General
    Replies: 0
    Last Post: 03-25-2011, 11:53 AM
  6. GETPIVOTDATA with a NOT function?
    By zonino in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-24-2009, 07:21 AM
  7. =GETPIVOTDATA function
    By cc68 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-05-2008, 06:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1