#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Auto Highlight Code


Hey Crew.

I made a really sexy macro with the Help of Dave (forum person). Now
this macro saves my information to .csv format, But what im looking for
is the code which i can add to this macro that will only select the
cells i wish. e.g. cell "N11 down to "W35".

So anyone know any auto select code??? Spanks for your help


--
joelbeveridge
------------------------------------------------------------------------
joelbeveridge's Profile: http://www.excelforum.com/member.php...o&userid=37045
View this thread: http://www.excelforum.com/showthread...hreadid=568179

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Auto Highlight Code

Range("N11:W35).Select

Note: you rarely have to use select.

Instead of

Dim actSht As Worksheet
Set actSht = ActiveSheet
Worksheets("Sheet2").Activate
Range("A1:J10").Select
Selection.Copy
actSht.Activate
Range("K43").Select
ActiveSheet.Paste

use

Worksheets("Sheet2").Range("A1:J10").Copy _
Destination:=ActiveSheet.Range("K43")

or, if you just want to copy values:

Range("K43").Resize(10, 10).Value = _
Worksheets("Sheet2").Range("A1:J10").Value

which bypasses using the Clipboard (and is analogous to Paste
Special/Values)


Gord Dibben MS Excel MVP



On Thu, 3 Aug 2006 20:58:46 -0400, joelbeveridge
wrote:


Hey Crew.

I made a really sexy macro with the Help of Dave (forum person). Now
this macro saves my information to .csv format, But what im looking for
is the code which i can add to this macro that will only select the
cells i wish. e.g. cell "N11 down to "W35".

So anyone know any auto select code??? Spanks for your help


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Auto Highlight Code

Check your other thread.

joelbeveridge wrote:

Hey Crew.

I made a really sexy macro with the Help of Dave (forum person). Now
this macro saves my information to .csv format, But what im looking for
is the code which i can add to this macro that will only select the
cells i wish. e.g. cell "N11 down to "W35".

So anyone know any auto select code??? Spanks for your help

--
joelbeveridge
------------------------------------------------------------------------
joelbeveridge's Profile: http://www.excelforum.com/member.php...o&userid=37045
View this thread: http://www.excelforum.com/showthread...hreadid=568179


--

Dave Peterson
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
auto sum in lower right corner does not appear when I highlight ce frustrated financial person Excel Discussion (Misc queries) 5 October 13th 08 08:55 PM
How can I auto highlight a cell Kathi Excel Worksheet Functions 1 June 30th 06 04:45 AM
Sheet protection code conflicts with Pivot Table "auto refresh" KG Excel Discussion (Misc queries) 6 December 21st 05 11:16 PM
Conform a total to a list of results? xmaveric Excel Discussion (Misc queries) 1 August 21st 05 07:22 PM
Macro for changing text to Proper Case JPriest Excel Worksheet Functions 3 August 8th 05 09:31 PM


All times are GMT +1. The time now is 05:11 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"