Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Help with a simple macro

I have the following macro. Before I run it each time I have to edit the reference to "030" below (4th line from bottom). For example, I will edit it to "031" then run it. I will then edit it to "032" then run it again...etc

It is because I dont know how to make that particular line in the macro be referable to a cell which will change each time I want to run the Macro. I was hoping to position my cursor into the desired target cell (be it 030 or 031 or 032 or 033 etc etc) prior to running the macro, and then for Macro to paste the stuff I have copied from a different source (an extract from a PDF file for instance)

Any help appreciated. Thanks


Sub MacroGM4()
'
' MacroGM4 Macro
'

'
Range("O1:O11").Select
Range("O11").Activate
Selection.ClearContents
Range("O1").Select
ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, _
DisplayAsIcon:=False, NoHTMLFormatting:=True
Range("O12").Select
Selection.Copy
Range("O30").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

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
Help with simple macro Sam Commar Excel Discussion (Misc queries) 3 April 15th 08 04:30 PM
Simple macro MikeD1224 Excel Discussion (Misc queries) 1 June 9th 07 12:06 AM
Need help with simple macro garlnnd Excel Programming 4 October 5th 05 07:22 PM
Simple Macro Richard[_20_] Excel Programming 2 March 3rd 04 07:44 PM
Simple macro - help please!! Micheal Excel Programming 2 October 24th 03 04:30 PM


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

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"