Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Possible syntax error

Can anyone suggest a reason why the following fails?

Range("E4").Copy Destination:=Range(Range("B1").Value)

Thanks,

RonW.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default Possible syntax error

Try -

Range("b1") = Range("e4").Value

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Possible syntax error

Because syntactically it is wrong!.

Try using......

Range("E4").Copy Destination:=Range("B1")


--
Cheers
Nigel



"Worldman1" wrote in message
oups.com...
Can anyone suggest a reason why the following fails?

Range("E4").Copy Destination:=Range(Range("B1").Value)

Thanks,

RonW.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Possible syntax error

Hi Ron,

Having re-read, your original thread, try changing the contents of cell B1
from

"E:14"


to a valid cell reference, e.g.:

E14

Subject to a valid cell reference in the cell of interest, I had no problem
with my suggested code.


---
Regards,
Norman



"Worldman1" wrote in message
oups.com...
Can anyone suggest a reason why the following fails?

Range("E4").Copy Destination:=Range(Range("B1").Value)

Thanks,

RonW.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Possible syntax error

Does B1 contain a valid cell reference? (like C12)

--
AP

"Worldman1" a écrit dans le message de news:
...
Can anyone suggest a reason why the following fails?

Range("E4").Copy Destination:=Range(Range("B1").Value)

Thanks,

RonW.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Possible syntax error

Thanks Nigel, but I need to explain that cell B1 contains a reference
to another cell which is to be the destination of the value in E4. The
purpose is not to copy E4 to B1

If you know how then pls tell me - thanks again , , ,

Cheers,
RonW.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Possible syntax error

Hi Nigel,

Because syntactically it is wrong!.


Are you sure?!

See Ron's original thread and my response to Ron in this thread.

http://tinyurl.com/qvsej


---
Regards,
Norman



"Nigel" wrote in message
...
Because syntactically it is wrong!.

Try using......

Range("E4").Copy Destination:=Range("B1")


--
Cheers
Nigel



"Worldman1" wrote in message
oups.com...
Can anyone suggest a reason why the following fails?

Range("E4").Copy Destination:=Range(Range("B1").Value)

Thanks,

RonW.





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Possible syntax error

AP, you got it in one - I goofed

I had E:21 in B1, of course it should have been E21

Thanks to everyone for your kind assistance :-)

Cheers,
RonW.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default Possible syntax error

Sorry, I read this literally as a value copy not a reference copy!

--
Cheers
Nigel



"Norman Jones" wrote in message
...
Hi Nigel,

Because syntactically it is wrong!.


Are you sure?!

See Ron's original thread and my response to Ron in this thread.

http://tinyurl.com/qvsej


---
Regards,
Norman



"Nigel" wrote in message
...
Because syntactically it is wrong!.

Try using......

Range("E4").Copy Destination:=Range("B1")


--
Cheers
Nigel



"Worldman1" wrote in message
oups.com...
Can anyone suggest a reason why the following fails?

Range("E4").Copy Destination:=Range(Range("B1").Value)

Thanks,

RonW.







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
runtime error: syntax error or access violation oucsester[_2_] Excel Programming 1 May 3rd 06 05:51 PM
runtime error: syntax error or access violation oucsester Excel Programming 0 May 3rd 06 02:22 PM
variable not declared error & syntax error G. Beard Excel Programming 1 October 6th 05 09:16 PM
Syntax error. David McNally Excel Programming 3 April 28th 04 02:57 AM
Syntax Error Runtime Error '424' Object Required sjenks183 Excel Programming 1 January 23rd 04 09:25 AM


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

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

About Us

"It's about Microsoft Excel"