View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
p45cal[_226_] p45cal[_226_] is offline
external usenet poster
 
Posts: 1
Default exporting specific cell(s)/ range


James;612375 Wrote:
do i need to highlight the entire row? which cell needs to be avtive in
order
for this to transfer?


The only thing which needs to be active is the sheet which has the
range A4:C4,I4:Q4 on. It doesn't matter what cells are selected.

It looks as if the code isn't even running. To test this, temporarily
add a line:
Stop
as the first line after 'Sub ClickAdd()'
Then try again.
If it's running, it should stop at that line with a yellow highlight in
the VBE.
You can then step through the code with F8 or let it continue running
unfettered with F5. If you step through the code you can make sure that
the code is following the path you'd expect it to.
Once confirmed that it's at least being called, you should be able to
remove the Stop line again.
If this doesn't happen, then you're not calling the routine at all and
you need to adjust how you're calling it.
In any event, you should be able to call it from the sheet with
Tools|Macros etc.

Of course, if the button is on a sheet called John Smith (or is it the
button labelled John Smith?), and that sheet doesn't have the data on it
in that range A4:C4,I4:Q4, then when you press the button, John Smith is
the active sheet at that point, so nothing is going to be transferred.
Naturally, if you want data to be transferred from or to inactive sheet
that can be tweaked in the code.

Also, what is the name of the code module that you've put this code in?


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: 558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=169024

Microsoft Office Help