View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Alec H
 
Posts: n/a
Default Macro problem.......


Hans,

You posted...


Include this in your code to see what actually has been selected and
hence would be copied:

MsgBox ActiveWindow.RangeSelection.Address

Forgive me for being stupid, but when I insert this into my code above
the "offending" line (Range("A1:A15").Select) it appears to merely
opens a message box and does not direct the following lines of code to
copy the first 15 lines of selected data ready for pasting elsewhere.

Here is my complete code as it stands;


Sheets("Customer List").Select
MsgBox ActiveWindow.RangeSelection.Address
Range("A1:A15").Select
Selection.Copy
Sheets("Stage 1 - Visit diary").Select
Range("E4:E18").Select
ActiveSheet.Paste
Sheets("Customer List").Select


I know it is only simple, but so am I...:(


--
Alec H
------------------------------------------------------------------------
Alec H's Profile: http://www.excelforum.com/member.php...o&userid=31042
View this thread: http://www.excelforum.com/showthread...hreadid=512581