Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2007

Tip: Looking for answers? Try searching our database.

How to reference variable worksheets and variable row

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
glenn - 29 Sep 2007 10:38 GMT
   

Hi all

How do i write  "Get row W from worksheet X and copy row W  to row Y
(inserting row W in the position where row Y is) on worksheet Z" in VBA?

WXYZ would be variables in my script.

Thanks!
Gary''s Student - 29 Sep 2007 12:21 GMT
Hi glenn:

After we get row W, should we just put the data into row Y, or insert a new
row above Y and put the data into the newly inserted row?
Signature

Gary''s Student - gsnu200747

>    
>
[quoted text clipped - 6 lines]
>
> Thanks!
Tomcat - 29 Sep 2007 14:44 GMT
> Hi glenn:
>
> After we get row W, should we just put the data into row Y, or insert a new
> row above Y and put the data into the newly inserted row?

Hi thanks to everybody for the answers.

Yes, insert a new row above Y an put the data from row W into the newly
inserted row! Like whe you want to copy columns headers rows to another
worksheet that contains data.

thanks!
JE McGimpsey - 29 Sep 2007 12:36 GMT
One way:

       Worksheets(X).Rows(W).Copy Destination:=Worksheets(Z).Rows(Y)

>    
>
[quoted text clipped - 6 lines]
>
> Thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.