Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 12-10-2013, 10:48 AM
BobBridges's Avatar
BobBridges BobBridges is offline how can I cut and paste a line in page1 to page 2 by clicking a button? Windows 7 64bit how can I cut and paste a line in page1 to page 2 by clicking a button? Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Sorry for the delay, esco.

I was hoping that your language would be one of the ones I can read, but Turkish isn't among them. Oh, well.

v2 and v3 are just the names of variables; in my program, I put the values that are in Page1!A2 and ...A3 into two variables, which I named v2 and v3, and then put them into A2 and A3 of the target worksheet. But you don't have to do it that way; you could do it directly, like this:
Code:
Sub Something() 'I don't care what you name it.
  Set wo = ThisWorkbook
  Set soFm = wo.Worksheets("Page1")

  ' Get the target worksheet name and paste the data.
  snTo = soFm.Range("A1").Value
  set soTo = wo.Worksheets(snTo)
  soTo.Range("A2").Value = soFm.Range("A2").Value
  soTo.Range("A3").Value = soFm.Range("A3").Value

  End Sub
I still need to see what your version of the program looks like. You showed me part of a program, but it's the program that you were using before you asked this question. I want to see the program that you started writing after I sent you some sample code. Remember? I showed you the beginning of a program, and I said "tell me whether it's working right". You answered "I did it :P". I want to see that program.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you prevent an empty line from appearing in the first line of a page? New Daddy Word 10 11-18-2013 07:01 AM
how can I cut and paste a line in page1 to page 2 by clicking a button? Find, copy and paste into a new page jperez84 Word VBA 24 09-20-2012 11:34 AM
how can I cut and paste a line in page1 to page 2 by clicking a button? How to paste into another app without line numbers? Moonf4 Word 1 04-18-2011 03:16 PM
First line on page is truncated (top of line) OwlCat1212 Word 0 02-14-2011 03:24 PM
How to cut and paste a graphic to a different page in word.? soooty Drawing and Graphics 1 08-12-2010 11:17 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft