Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default ActiveCell.FormulaR1C1

I don't see the problem, but

Range("R2").Value = "4100"

or

Range("R2").Value = 4100

should work.

--
Regards,
Tom Ogilvy


"Kevin" wrote in message
...
I have code that works using a drop down bax and a paste link in excel...
The
code is a follows;

Sub Button9_Click()
' Cost Element Button

'This part of the code clears the other filters
Worksheets("WBS Query").Range("B4,E6,G4,J4,M4").ClearContents



' Sheets("WBS DATA").Select

' Range("R2").Select
' ActiveCell.FormulaR1C1 = "4100"



'This part of the code Copies and pastes the criteria
Worksheets("WBS Data").Range("Q2:T2").Copy
ActiveSheet.Paste Destination:=Worksheets("WBS Data").Range("Q3:T3")

Set Company = Worksheets("WBS Data").Range("R1")
Set Query = Worksheets("WBS Data").Range("WBS_Charges")
Set Criteria = Sheets("WBS Data").Range("r1:R2")

Worksheets("WBS Data").Range("R1").Calculate
Query.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Criteria, _
CopyToRange:=Range("A11:M11"), Unique:=False

'This part of the code copies Q3:T3, pastes it back to Q2:T2 and deletes
Q3:T3
Worksheets("WBS Data").Range("Q3:T3").Copy
ActiveSheet.Paste Destination:=Worksheets("WBS Data").Range("Q2:T2")
Worksheets("WBS Data").Range("Q3:T3").Clear

End Sub

This code seems to work fine... But when I try to modify it using;

Sheets("WBS DATA").Select
Range("R2").Select
ActiveCell.FormulaR1C1 = "4100"

it gives me (Run-time error 1004, the extract has a missing or illegal
field
name)

I can block out;
Worksheets("WBS Data").Range("R1").Calculate
Query.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Criteria, _
CopyToRange:=Range("A11:M11"), Unique:=False

and force the 4100 into Cell r2, then unblock the code, and Block the
FormulaR1C1 code and it will work... Just not together...

I apploigize for posting this twice, I can't seem to find my first
question
in the Seach results...

Thanks in Advance;
Kevin




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
ActiveCell.FormulaR1C1 Rick Excel Discussion (Misc queries) 3 March 28th 10 10:36 PM
ActiveCell.FormulaR1C1 Sum Function mb Excel Programming 7 October 29th 05 11:40 PM
Excel VBA - use of ActiveCell.FormulaR1C1 pgi Excel Programming 1 June 1st 04 08:12 AM
activecell.formular1c1 monika Excel Programming 0 April 29th 04 10:13 AM
ActiveCell.FormulaR1C1 Leif Rasmussen Excel Programming 1 October 16th 03 09:46 AM


All times are GMT +1. The time now is 02:36 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"