Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Progmatically adding controls in multipage

I am using the below code to add a frame on a form. Also i need to add
another frame to an alreading existing multipage. I could not refer to the
already existing multipage. Could anyone chip in the reference ...

Sub Add_Control_Testing(Workbook_Name As String, Form_Name As String)
' Declare variables.
Dim myform As Object
Dim myframe As Object

' to manipulate the UserForm.
Set mynewform =
Workbooks(template_Name).VBProject.VBComponents.It em(module_Name)

'Adding a frame
Dim mymultipage As Object
Set mymultipage = mynewform.Designer.Controls
Set myframe = mynewform.Designer.Controls.Add("Forms.Frame.1")
With myframe
.Name = "frame_1"
.Top = 180
.Left = 390
.Height = 60
.Width = 202
.BorderStyle = 1
End With
End Sub
--
Ajit
Reply
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
need help understanding syntax for adding a page to multipage GregJG[_11_] Excel Programming 9 July 10th 04 11:20 AM
Multipage & Spinbutton controls on a form Bhuktar S Excel Programming 1 April 21st 04 01:50 PM
Events for Controls in a Multipage Control George[_18_] Excel Programming 4 February 18th 04 05:56 PM
Scrollable list box demo now handles multipage controls Robin Hammond Excel Programming 0 October 8th 03 03:24 AM
Adding components to multipage programatically Nigel Brown[_2_] Excel Programming 0 August 4th 03 10:25 AM


All times are GMT +1. The time now is 02:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"