![]() |
|
|
|
#1
|
|||
|
|||
|
well it looks like did something but page2 A2 A3 are still empty.
my language is Turkish. what does v2 v3 mean? I know this and works. ![]() Range("A1:A2").Select Selection.Cut Range("C4").Select ActiveSheet.Paste |
|
#2
|
||||
|
||||
|
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
|
|
|
|
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 |
Find, copy and paste into a new page
|
jperez84 | Word VBA | 24 | 09-20-2012 11:34 AM |
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 |