p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > Microsoft Office > Excel VBA > Excel VBA
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 23rd, 2009, 04:08 AM
Registered User
Points: 32, Level: 1
Points: 32, Level: 1 Points: 32, Level: 1 Points: 32, Level: 1
Activity: 20%
Activity: 20% Activity: 20% Activity: 20%
 
Join Date: Oct 2009
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Default How to read Columns ?

hi,

anyone know how to code to create a new worksheet?
i only manage to read row didn't manage to read column.
i would like to read my sheet1 column5 to 7 and copy it to a new worksheet.

Last edited by waka : October 23rd, 2009 at 06:07 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #2 (permalink)  
Old October 23rd, 2009, 05:42 PM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 5%
Activity: 5% Activity: 5% Activity: 5%
 
Join Date: Oct 2009
Posts: 2
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Maybe something like this?

Code:
    Sheets("Sheet1").Columns("E:G").Copy
    Sheets.Add
    ActiveSheet.Paste
    Application.CutCopyMode = False
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
The Following User Says Thank You to joe1946 For This Useful Post:
waka (October 26th, 2009)
  #3 (permalink)  
Old October 26th, 2009, 03:09 AM
Registered User
Points: 32, Level: 1
Points: 32, Level: 1 Points: 32, Level: 1 Points: 32, Level: 1
Activity: 20%
Activity: 20% Activity: 20% Activity: 20%
 
Join Date: Oct 2009
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Default

how can i make it, just to copy the value over instead of copying together with the blank space?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
  #4 (permalink)  
Old November 7th, 2009, 10:43 PM
Friend of Wrox
Points: 1,449, Level: 15
Points: 1,449, Level: 15 Points: 1,449, Level: 15 Points: 1,449, Level: 15
Activity: 17%
Activity: 17% Activity: 17% Activity: 17%
 
Join Date: Sep 2005
Location: , , .
Posts: 420
Thanks: 0
Thanked 14 Times in 14 Posts
Default

Quote:
Originally Posted by waka View Post
how can i make it, just to copy the value over instead of copying together with the blank space?
Can you try if the following works:

Code:
Sheets("Sheet1").Columns("E:G").UsedRange.Copy
Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Read CSV file - Save Columns into Rows pintoo BOOK: Professional SQL Server 2005 Integration Services ISBN: 0-7645-8435-9 1 August 20th, 2008 10:01 AM
two columns if... gabster XSLT 0 August 15th, 2007 01:21 PM
Read Only Form Is not Read only lryckman Access VBA 3 June 12th, 2007 07:30 AM
Java solution Read Mixed data columns from excel. pranjaldutta VBScript 1 March 19th, 2007 01:29 PM
sub columns preethisg BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 0 December 27th, 2005 01:53 AM



All times are GMT -4. The time now is 07:49 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc