SunQuest
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old July 1st, 2003, 11:45 AM
Atomskish Atomskish is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 5 Atomskish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
VBScript + Access?

MsgBox PivotTable5.ActiveData.Cells.DetailCells(0,0).Value

Gives an error when I run?

Reply With Quote
  #2  
Old July 1st, 2003, 01:08 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
And what error might that be? And is it VBScript or VBA?

Reply With Quote
  #3  
Old July 1st, 2003, 01:13 PM
Atomskish Atomskish is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 5 Atomskish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
VBScript.

"Wrong number of arguments, or invalid property assignment:
'PivotTable5.ActiveData.Cells'"

Reply With Quote
  #4  
Old July 1st, 2003, 01:40 PM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,834 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 30 m 30 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
I may be wrong, but doesn't the Cells require a row and column?

more info...
http://dbforums.com/arch/191/2002/6/399718

Reply With Quote
  #5  
Old July 1st, 2003, 01:52 PM
Atomskish Atomskish is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 5 Atomskish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
That example is close, but I'm having some trouble adapting it to my situation. My table doesen't have any row or column fields, I just dragged all of my table fields into the 'DataAxis' area.

(The thing that confuses/annoys me about this is how he has ActiveData.RowAxis as part of the expression, but when you go to type it in, RowAxis is missing from the autocomplete dropdown list.)

Reply With Quote
  #6  
Old July 1st, 2003, 02:04 PM
Atomskish Atomskish is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 5 Atomskish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Apparently, this is the way to do it in VBA. Does anyone know the equivalent expression(s) for VBS?


Dim CellValue
Dim ActView As PivotView
Dim fldSets As PivotFieldSets
Dim Sel As PivotDetailRange
Dim RowNum As Long
Dim pvDetCell As PivotDetailCell
Dim PvCell As PivotCell

Set ActView = PvTable.ActiveView
Set fldSets = ActView.FieldSets
Set Sel = PvTable.selection
Set pvDetCell = Sel.BottomRight
RowNum = pvDetCell.Row

With PvTable.ActiveData
Set PvCell = .cells(.RowMembers(0), .ColumnMembers(0))
End With
CellValue = PvCell.DetailCells(RowNum, 4).value

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > VBScript + Access?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway