Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default darn these quotes.. please help

i am having trouble with this code .. variable sid pulls the company
code from another workbook. this works perfectly. but the error
happens when i enter the do while loop. when i want to place the
getpivotdata formula in the cell.
can someone please help me with this. I think the problem is
happening due to my quotes.. because i am trying to pull values from
variables in my code and insert them into the string. i cant seem to
figure out if my quotes are just in the wrong place.. or if i am just
not doing it correctly. .

I anyone would be kind enough to help me Iwould greatly appriciate it.

Dim sid As Double
Dim amount As Integer

sid = Application.Run("'personal.xlsb'!Numberit",
mybook.Worksheets("Revenue & Product Data").Range("A1"))
i = 20

Do While i < 61
Range("E" & i).Select
ActiveCell.FormulaR1C1 = _
"=GETPIVOTDATA(""YTD Total Units"",[PERSONAL.XLSB]Sheet5!
R3C1,""SIEBELLINKID""," & CStr(sid) & ",""CU_CODE"",$A" & CStr(i) &
")"
i = i + 1

Loop

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default darn these quotes.. please help

See possible answer to your later posting of this question.

--
Regards,
Tom Ogilvy


"mithu" wrote:

i am having trouble with this code .. variable sid pulls the company
code from another workbook. this works perfectly. but the error
happens when i enter the do while loop. when i want to place the
getpivotdata formula in the cell.
can someone please help me with this. I think the problem is
happening due to my quotes.. because i am trying to pull values from
variables in my code and insert them into the string. i cant seem to
figure out if my quotes are just in the wrong place.. or if i am just
not doing it correctly. .

I anyone would be kind enough to help me Iwould greatly appriciate it.

Dim sid As Double
Dim amount As Integer

sid = Application.Run("'personal.xlsb'!Numberit",
mybook.Worksheets("Revenue & Product Data").Range("A1"))
i = 20

Do While i < 61
Range("E" & i).Select
ActiveCell.FormulaR1C1 = _
"=GETPIVOTDATA(""YTD Total Units"",[PERSONAL.XLSB]Sheet5!
R3C1,""SIEBELLINKID""," & CStr(sid) & ",""CU_CODE"",$A" & CStr(i) &
")"
i = i + 1

Loop


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New workbook and darn text boxes GIdunno Excel Discussion (Misc queries) 3 July 27th 07 08:14 PM
change straight quotes to curly quotes callico Excel Discussion (Misc queries) 2 June 22nd 07 10:23 PM
Those darn checkboxes!! Please help!! Sweetpea Excel Programming 0 July 25th 06 10:19 PM
Darn function in vba Jennifer Excel Programming 3 May 16th 06 07:22 AM
How do i get historical stock quotes using MSN Money Stock Quotes Ash Excel Discussion (Misc queries) 0 May 11th 06 03:26 AM


All times are GMT +1. The time now is 08:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"