Showing codes as default? 
Author Message
 Showing codes as default?

Whenever I click on the "user form" on the project explorer to edit
the codes to a userform, the physical userform pops up instead of the
codes.

How do i make the codes to pop up instead of the form by default?

Thanks.



Mon, 19 Jan 2004 10:36:47 GMT  
 Showing codes as default?
Hi DJ,

The only way you can bring the UserForm code directly
is to select the proper window in VBE menu: Window

Normally listed like:
[Name project] UserForm1 (Code)

Where as window option:
[Name project] UserForm1 (UserForm)
brings up the (as you call it: physical) UserForm

Kind regards,
Perry



Quote:
> Whenever I click on the "user form" on the project explorer to edit
> the codes to a userform, the physical userform pops up instead of the
> codes.

> How do i make the codes to pop up instead of the form by default?

> Thanks.



Sun, 25 Jan 2004 06:31:48 GMT  
 Showing codes as default?
Hi DJ,

Click on the form in the Project Explorer and press F7.

Regards,

Michael Harris

Quote:

>Hi DJ,

>The only way you can bring the UserForm code directly
>is to select the proper window in VBE menu: Window

>Normally listed like:
>[Name project] UserForm1 (Code)

>Where as window option:
>[Name project] UserForm1 (UserForm)
>brings up the (as you call it: physical) UserForm

>Kind regards,
>Perry



>> Whenever I click on the "user form" on the project explorer to edit
>> the codes to a userform, the physical userform pops up instead of the
>> codes.

>> How do i make the codes to pop up instead of the form by default?

>> Thanks.



Sun, 25 Jan 2004 16:35:27 GMT  
 Showing codes as default?

What I think DJ wants is way to make this happen by default whenever
you open the relevant file in the VBE.  I've wished for this long &
hard but have always come up blank.  The only (imperfect) solution
I've found involves a third-party keystroke recorder program that I
set up to remember a formidable sequence of keystrokes: opening the
VBE, viewing the Project Explorer, expanding the [+] symbol at the
userform's project -- which must be named so that it appears *first*
alphabetically -- then navigating painfully down the list of its
components to the form, then having the keymacro press F7 to open
the code window.

Obviously this is almost not worth the trouble.  The program I use to
accomplish this, to which I am {*filter*}ed, is called Keyboard Express
( http://www.*-*-*.com/ ).  It does save some time and nerves
but not as much as I'd like.  Often I just hit CTRL+TAB in the editor
to get to the window I need.  If it's open.  Sigh.


------ WWW: http://www.*-*-*.com/ ~mtangard ----------------------
------------- "Life is nothing if you're not obsessed." --John Waters
---------------------------------------------------------------------

Quote:

> Hi DJ,

> Click on the form in the Project Explorer and press F7.

> Regards,

> Michael Harris


> >Hi DJ,

> >The only way you can bring the UserForm code directly
> >is to select the proper window in VBE menu: Window

> >Normally listed like:
> >[Name project] UserForm1 (Code)

> >Where as window option:
> >[Name project] UserForm1 (UserForm)
> >brings up the (as you call it: physical) UserForm

> >Kind regards,
> >Perry



> >> Whenever I click on the "user form" on the project explorer to edit
> >> the codes to a userform, the physical userform pops up instead of the
> >> codes.

> >> How do i make the codes to pop up instead of the form by default?

> >> Thanks.



Sun, 25 Jan 2004 18:01:57 GMT  
 Showing codes as default?
Hi DJ and Mark,

Sorry, I obviously misunderstood.  Perhaps this is more along the lines
of what you need.

Make a reference to Microsoft Visual Basic For Applications Extensibility
Add a UserForm
Add a listbox, ListBox1 to the userform
Add a command button, CommandButton1 to the userform
Add the code below to the userform
Select the module you wish to view and click the CommandButton
This should be easily modified to do what you want.

Dim VBComp as VBComponent

Private Sub CommandButton1_Click()
    Set CodeWindow =
Application.VBE.ActiveVBProject.VBComponents(ListBox1.List(ListBox1.ListInde
x))
    CodeWindow.CodeModule.CodePane.Show
End Sub

Private Sub UserForm_Initialize()
    For Each CodeWindow In Application.VBE.ActiveVBProject.VBComponents
        ListBox1.AddItem CodeWindow.Name
    Next CodeWindow
End Sub

I hope I've got it right this time.  If not, well, perhaps I'll just keep my
nose out of things :)

Cheers

Michael Harris

Quote:

>What I think DJ wants is way to make this happen by default whenever
>you open the relevant file in the VBE.  I've wished for this long &
>hard but have always come up blank.  The only (imperfect) solution
>I've found involves a third-party keystroke recorder program that I
>set up to remember a formidable sequence of keystrokes: opening the
>VBE, viewing the Project Explorer, expanding the [+] symbol at the
>userform's project -- which must be named so that it appears *first*
>alphabetically -- then navigating painfully down the list of its
>components to the form, then having the keymacro press F7 to open
>the code window.

>Obviously this is almost not worth the trouble.  The program I use to
>accomplish this, to which I am {*filter*}ed, is called Keyboard Express
>( http://www.*-*-*.com/ ).  It does save some time and nerves
>but not as much as I'd like.  Often I just hit CTRL+TAB in the editor
>to get to the window I need.  If it's open.  Sigh.


>------ WWW: http://www.*-*-*.com/ ~mtangard ----------------------
>------------- "Life is nothing if you're not obsessed." --John Waters
>---------------------------------------------------------------------


>> Hi DJ,

>> Click on the form in the Project Explorer and press F7.

>> Regards,

>> Michael Harris


>> >Hi DJ,

>> >The only way you can bring the UserForm code directly
>> >is to select the proper window in VBE menu: Window

>> >Normally listed like:
>> >[Name project] UserForm1 (Code)

>> >Where as window option:
>> >[Name project] UserForm1 (UserForm)
>> >brings up the (as you call it: physical) UserForm

>> >Kind regards,
>> >Perry



>> >> Whenever I click on the "user form" on the project explorer to edit
>> >> the codes to a userform, the physical userform pops up instead of the
>> >> codes.

>> >> How do i make the codes to pop up instead of the form by default?

>> >> Thanks.



Thu, 29 Jan 2004 11:24:23 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Default country code and city code

2. Showing the default printer

3. show save as dialog with default doc path but current file name

4. How do I the default page in IIS to show last file date and time

5. Default Printer not showing up in Excel

6. Not showing default content

7. How to show defaults when AddNew

8. ADO won't show default data values from Access

9. Default values shown in textboxes in ADO

10. Code to set default printer

11. Setting Default Value with VBA code

12. Change Default Value in Table by Code

 

 
Powered by phpBB® Forum Software