LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Set rng for Column A only (ignores other columns)

Hello,
I'm trying to loop this: copy each cell in column A that is selected,
paste to Sheet2's A1, print. Loop until all selected cells are copied
to Sheet2.

How do u improve this code so that even if other users mistakenly
highlight the entire row, the rng = selection.cells would only be the
data within column A and not the entire row?

Set rng = Selection.Cells

For Each cell In rng
cell.Copy
Sheets("Sheet2").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

Next cell

Thanks!
Aria :)

*** Sent via Developersdex http://www.developersdex.com ***
 
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
Excel ignores LocaleID? Sonnich Jensen Excel Discussion (Misc queries) 0 October 25th 11 03:33 PM
formula ignores last infor - please help sonar Excel Worksheet Functions 8 November 22nd 05 08:53 AM
Min Value using array ignores Zero mauddib Excel Discussion (Misc queries) 2 February 16th 05 07:02 PM
ignores hidden columns? WashoeJeff Excel Programming 1 December 27th 03 12:18 AM
Excel ignores VBA commands Gregg Roberts[_2_] Excel Programming 4 November 7th 03 03:51 PM


All times are GMT +1. The time now is 11:46 AM.

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"