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 November 27th, 2009, 04:22 PM
Registered User
 
Join Date: Dec 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ttitto
Default Creating Form controls with VBA

Is it possible to create a form using VBA script. I want to populate it with as many controls as indicated in a variable cnt
 
Old November 27th, 2009, 10:55 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

You can use

controls.Add to add the control you want

then you need to position them accordingly

If you want to create a userform from scratch, try if VBComponents can help you. I have used it for creating a module (http://vbadud.blogspot.com/2008/10/p...-to-excel.html)

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
adding controls on vba form from an addin narendrapawar Pro VB 6 1 April 25th, 2010 04:59 PM
Ch.14 Creating Windows Form User Controls problem SAIFI BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 1 September 29th, 2008 05:51 AM
Create/Add controls to Access Form: VBA program AccessBeginner Access VBA 1 October 13th, 2005 06:48 AM
Creating controls in code taraj ASP.NET 1.0 and 1.1 Basics 1 November 15th, 2004 11:29 AM
Creating form controls on the fly roniestein Access 6 December 23rd, 2003 01:30 PM





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