Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
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 Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 5th, 2003, 02:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default Elegant solution preserving info

I'm using named ranges to group persons listed in Col A. I'd like to be able
to transfer these named ranges to a new workbook and of cause the names listed
in Col A.
I could save the groupnames and rangedefinitions in a sheet but that's a lot of
extra updating if it's possible to reference and copy the ranges directly from
Excel.
Anyone knows how to do that?

A secondary issue: when I remove a person I end up with an empty row (which is
necessary due to the design I'm using right now). This empty row continues beeing
part of any group defined earlier. Using this row for another person might place
him/her in a wrong group.
I'm uncertain whether deleting the row always will update the ranges correctly,
likewise inserting a new row, how's it affecting the ranges as one person may
participate in many groups.
I'm looking for a simple and secure method to handle groups. Maybe the answer
is not using named ranges.
Any suggestions ?

Thanks in advance!
 
Old June 10th, 2003, 03:18 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, the lack of answers could be it's too easy. I found the answer to the first part. If anyone newbee could use it, here's a solution:

Sub FindNames()
    Dim RngName As Name
        For Each RngName In ActiveWorkbook.Names
            MsgBox (RngName.Name & RngName)
        Next RngName
End Sub





Similar Threads
Thread Thread Starter Forum Replies Last Post
Preserving software from the piracy with VB mykkel VB How-To 3 May 30th, 2011 03:22 PM
preserving whitespaces in attribute values? kaps77 XSLT 7 August 13th, 2007 11:48 AM
preserving entity references muki XSLT 6 March 7th, 2006 12:08 PM
Looking for an elegant solution fizzerchris Classic ASP Basics 3 February 2nd, 2006 07:54 PM
Preserving DataTypes in DTS execution hemanth_p2p SQL Server DTS 9 December 15th, 2005 12:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.