Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jim May
 
Posts: n/a
Default Change result of Macro Recorder

Below produced by Macro Recorder:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 5/21/2005 by James May
'
Selection.Copy
Range("H17").Select
Selection.PasteSpecial Paste:=xlPasteComments, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End Sub

I need to replace the Line Range("H17").Select with a clickable designated
other
cell, not just H17 as was done with the recorder. What do I put in its
place?
TIA,



  #2   Report Post  
papou
 
Posts: n/a
Default

Hello Jim
Use Application.InputBox eg:
Selection.Copy
Dim TheRange As Range
Set TheRange = Application.InputBox("Select your range", "Range?", , , , , ,
8)
TheRangePaste.Special Paste:=xlPasteComments, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

HTH
Cordially
Pascal


"Jim May" a écrit dans le message de news:
R0Fje.13792$Fv.8489@lakeread01...
Below produced by Macro Recorder:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 5/21/2005 by James May
'
Selection.Copy
Range("H17").Select
Selection.PasteSpecial Paste:=xlPasteComments, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End Sub

I need to replace the Line Range("H17").Select with a clickable
designated
other
cell, not just H17 as was done with the recorder. What do I put in its
place?
TIA,





  #3   Report Post  
Jim May
 
Posts: n/a
Default

Pascal:

Thanks for the code; since posting I discovered that perhaps I
could also just eliminate my original first 2 lines of code:

Selection.Copy
Range("H17").Select

and run (new) code after first (at the sheet) Copy, then click on my
destination cell.
Would this be an (OK) alternative?
Tks again..
Jim

"papou" wrote in message
...
Hello Jim
Use Application.InputBox eg:
Selection.Copy
Dim TheRange As Range
Set TheRange = Application.InputBox("Select your range", "Range?", , , , ,

,
8)
TheRangePaste.Special Paste:=xlPasteComments, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

HTH
Cordially
Pascal


"Jim May" a écrit dans le message de news:
R0Fje.13792$Fv.8489@lakeread01...
Below produced by Macro Recorder:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 5/21/2005 by James May
'
Selection.Copy
Range("H17").Select
Selection.PasteSpecial Paste:=xlPasteComments, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End Sub

I need to replace the Line Range("H17").Select with a clickable
designated
other
cell, not just H17 as was done with the recorder. What do I put in its
place?
TIA,







  #4   Report Post  
papou
 
Posts: n/a
Default

Yes you might as well!

Cordially
Pascal

"Jim May" a écrit dans le message de news:
jaGje.13814$Fv.5313@lakeread01...
Pascal:

Thanks for the code; since posting I discovered that perhaps I
could also just eliminate my original first 2 lines of code:

Selection.Copy
Range("H17").Select

and run (new) code after first (at the sheet) Copy, then click on my
destination cell.
Would this be an (OK) alternative?
Tks again..
Jim

"papou" wrote in message
...
Hello Jim
Use Application.InputBox eg:
Selection.Copy
Dim TheRange As Range
Set TheRange = Application.InputBox("Select your range", "Range?", , , ,
,

,
8)
TheRangePaste.Special Paste:=xlPasteComments, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False

HTH
Cordially
Pascal


"Jim May" a écrit dans le message de news:
R0Fje.13792$Fv.8489@lakeread01...
Below produced by Macro Recorder:
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 5/21/2005 by James May
'
Selection.Copy
Range("H17").Select
Selection.PasteSpecial Paste:=xlPasteComments, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End Sub

I need to replace the Line Range("H17").Select with a clickable
designated
other
cell, not just H17 as was done with the recorder. What do I put in its
place?
TIA,









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
convert value in word. For Exampe Rs.115.00 convert into word as . Shakti Excel Discussion (Misc queries) 1 May 10th 05 12:00 PM
How do I change macro text with another macro? Eric Excel Discussion (Misc queries) 4 April 27th 05 11:20 PM
macro color change Dan Excel Worksheet Functions 0 February 15th 05 09:35 PM
Amount or Numbers in Words ron New Users to Excel 6 December 24th 04 07:32 PM
Macro button colour change??? Beefyme Excel Worksheet Functions 1 November 19th 04 06:15 PM


All times are GMT +1. The time now is 11:07 PM.

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

About Us

"It's about Microsoft Excel"