PC Review


Reply
Thread Tools Rate Thread

darn these quotes.. please help

 
 
mithu
Guest
Posts: n/a
 
      25th Apr 2007
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 With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      25th Apr 2007
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 With Quote
Reply

Thread Tools
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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change straight quotes to curly quotes in an existing document Eric Microsoft Word Document Management 4 20th Sep 2009 11:16 PM
Can I search for straight quotes (") and exclude curly quotes (“ ” Eric Microsoft Word Document Management 3 8th Dec 2007 04:30 PM
convertng double quotes to single quotes in a column Morris Microsoft Access Form Coding 4 8th Feb 2007 04:52 PM
Script to change Smart quotes to straight quotes for all users? =?Utf-8?B?TWljaGFlbA==?= Microsoft Word Document Management 1 15th Nov 2006 05:12 AM
Replace double quotes (") with single quotes (') =?Utf-8?B?Z2Fy?= Microsoft VB .NET 7 2nd Jun 2004 02:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:46 PM.