#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 72
Default Macro - Code Missing

I have the following code to get information copied from one sheet to another
What i would like to happen is the cell i highlight and then press the macro
button the information is copied to to that position, and not to keep
defaulting to the one shown in the macro
Is there a peice of code i need to add to overcome this, any help you can
give will be much appreciated

Sheets("Pilot Valve Material").Select
Range("A2:B53").Select
Selection.Copy
Sheets("Stock Transactions").Select
Range("A1597").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=27
Sheets("Pilot Valve Material").Select
Range("C2:C53").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Stock Transactions").Select
Range("C1597").Select
ActiveSheet.Paste
Sheets("Pilot Valve Material").Select
Range("D2:E53").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Stock Transactions").Select
Range("D1597").Select
ActiveSheet.Paste
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Macro - Code Missing

Activate sheet 'Stock Transactions' and select the copy location and try the
below macro..

Sub Macro()
Sheets("Pilot Valve Material").Range("A2:E53").Copy _
Sheets("Stock Transactions").Range(ActiveCell.Address)
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Shane" wrote:

I have the following code to get information copied from one sheet to another
What i would like to happen is the cell i highlight and then press the macro
button the information is copied to to that position, and not to keep
defaulting to the one shown in the macro
Is there a peice of code i need to add to overcome this, any help you can
give will be much appreciated

Sheets("Pilot Valve Material").Select
Range("A2:B53").Select
Selection.Copy
Sheets("Stock Transactions").Select
Range("A1597").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=27
Sheets("Pilot Valve Material").Select
Range("C2:C53").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Stock Transactions").Select
Range("C1597").Select
ActiveSheet.Paste
Sheets("Pilot Valve Material").Select
Range("D2:E53").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Stock Transactions").Select
Range("D1597").Select
ActiveSheet.Paste
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 72
Default Macro - Code Missing

Jacob - thank you for coming back so quickly
I am so sorry but i don't understand (very new to macro's) where i need to
add the sub Macro
Could you advise please

"Jacob Skaria" wrote:

Activate sheet 'Stock Transactions' and select the copy location and try the
below macro..

Sub Macro()
Sheets("Pilot Valve Material").Range("A2:E53").Copy _
Sheets("Stock Transactions").Range(ActiveCell.Address)
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Shane" wrote:

I have the following code to get information copied from one sheet to another
What i would like to happen is the cell i highlight and then press the macro
button the information is copied to to that position, and not to keep
defaulting to the one shown in the macro
Is there a peice of code i need to add to overcome this, any help you can
give will be much appreciated

Sheets("Pilot Valve Material").Select
Range("A2:B53").Select
Selection.Copy
Sheets("Stock Transactions").Select
Range("A1597").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=27
Sheets("Pilot Valve Material").Select
Range("C2:C53").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Stock Transactions").Select
Range("C1597").Select
ActiveSheet.Paste
Sheets("Pilot Valve Material").Select
Range("D2:E53").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Stock Transactions").Select
Range("D1597").Select
ActiveSheet.Paste
End Sub

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Macro - Code Missing

You can replace your existing macro with the new macro..

If this post helps click Yes
---------------
Jacob Skaria


"Shane" wrote:

Jacob - thank you for coming back so quickly
I am so sorry but i don't understand (very new to macro's) where i need to
add the sub Macro
Could you advise please

"Jacob Skaria" wrote:

Activate sheet 'Stock Transactions' and select the copy location and try the
below macro..

Sub Macro()
Sheets("Pilot Valve Material").Range("A2:E53").Copy _
Sheets("Stock Transactions").Range(ActiveCell.Address)
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Shane" wrote:

I have the following code to get information copied from one sheet to another
What i would like to happen is the cell i highlight and then press the macro
button the information is copied to to that position, and not to keep
defaulting to the one shown in the macro
Is there a peice of code i need to add to overcome this, any help you can
give will be much appreciated

Sheets("Pilot Valve Material").Select
Range("A2:B53").Select
Selection.Copy
Sheets("Stock Transactions").Select
Range("A1597").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=27
Sheets("Pilot Valve Material").Select
Range("C2:C53").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Stock Transactions").Select
Range("C1597").Select
ActiveSheet.Paste
Sheets("Pilot Valve Material").Select
Range("D2:E53").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Stock Transactions").Select
Range("D1597").Select
ActiveSheet.Paste
End Sub

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 72
Default Macro - Code Missing

Thank you Jacob, when i replace the code and then run the macro it adds all
the data into side by side columns when i need it to follow the process i had
done including some blank columns to b left ( i add additional info into
these that is not always the same)
I read somewhere that you need to be recorded "relatively" not sure what
this ment

"Jacob Skaria" wrote:

You can replace your existing macro with the new macro..

If this post helps click Yes
---------------
Jacob Skaria


"Shane" wrote:

Jacob - thank you for coming back so quickly
I am so sorry but i don't understand (very new to macro's) where i need to
add the sub Macro
Could you advise please

"Jacob Skaria" wrote:

Activate sheet 'Stock Transactions' and select the copy location and try the
below macro..

Sub Macro()
Sheets("Pilot Valve Material").Range("A2:E53").Copy _
Sheets("Stock Transactions").Range(ActiveCell.Address)
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Shane" wrote:

I have the following code to get information copied from one sheet to another
What i would like to happen is the cell i highlight and then press the macro
button the information is copied to to that position, and not to keep
defaulting to the one shown in the macro
Is there a peice of code i need to add to overcome this, any help you can
give will be much appreciated

Sheets("Pilot Valve Material").Select
Range("A2:B53").Select
Selection.Copy
Sheets("Stock Transactions").Select
Range("A1597").Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=27
Sheets("Pilot Valve Material").Select
Range("C2:C53").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Stock Transactions").Select
Range("C1597").Select
ActiveSheet.Paste
Sheets("Pilot Valve Material").Select
Range("D2:E53").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Stock Transactions").Select
Range("D1597").Select
ActiveSheet.Paste
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding area codes only to phone numbers missing an area code RC Excel Discussion (Misc queries) 5 May 3rd 23 05:06 PM
Missing Macro Tim at alliant Excel Worksheet Functions 7 December 11th 08 09:29 PM
Missing a command in this macro jeannie v Excel Worksheet Functions 8 February 24th 08 07:29 AM
code to fill in missing border lines Jack Sons Excel Discussion (Misc queries) 3 November 3rd 05 10:06 PM
Assign to macro missing Paul Excel Discussion (Misc queries) 2 January 22nd 05 09:55 AM


All times are GMT +1. The time now is 08:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"