Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 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 March 17th, 2006, 06:36 AM
Registered User
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Working with Excel from VB6 program

Hi,

I need help with the following problem...

On the formula bar in Excel there is the Name Box that displays the cell name you are currently in. If you have a range of data...say A1:A10 highlighted, and you click in this name box you can give the selected range a name...say "DataList01". When you hit enter that will store the name in the dropdown list in the next to the Name Box field.

If you then select another cell...say B1 and click Data on the toolbar, then click Validation, you will be given a couple of options. If you set Allow = List and the Source = "DataList01", the cell B2 will have a dropdown list with all the elements from the range A1:A10 that you called "DataList01".

As you know, you can select a range of cells in Excel from VB, but how do give the range you selected a Name using a VB program. I have the correct code to select the range, and if I name the range in Excel first then run my VB program, it works.

Any help on this would be great - thanks








Similar Threads
Thread Thread Starter Forum Replies Last Post
How to tell the user that the program is working? chobo2 C# 1 November 10th, 2007 06:05 AM
working with crystal report through vb6 spforum VB Components 1 June 16th, 2006 03:15 PM
VB6/Excel/SQL tmiller1 Excel VBA 2 April 6th, 2005 02:10 PM
AS/400 program called using vb6 raysrocks VB Databases Basics 1 August 25th, 2003 05:37 PM
Linked Table working very slow with client program Nerijus Access 0 July 7th, 2003 08:34 AM





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