#1   Report Post  
Posted to microsoft.public.word.docmanagement
Nedan Nedzatra Nedan Nedzatra is offline
external usenet poster
 
Posts: 1
Default Running Userform

Hia

How can I run a Userform without enabling ActiveX or Macros and without
getting into VB Editor? Is there any way to have the list of Userforms (just
like the list of Macros)on the main Word interface?

Can you help Mates?

Nedan Nedzatra
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Nedan Nedzatra[_2_] Nedan Nedzatra[_2_] is offline
external usenet poster
 
Posts: 5
Default Running Userform

Hia

Thanks for responding Jay.

I am able to run User Forms from the VB Editor without enabling Macros and
ActiveX. I do it on Word 2007. I place the cursor on the User Form in the VBE
and click the Run Sub in the Run Menu or the tringular icon in the ribbon.
The codes are placed in Userform Initialize.



"Jay Freedman" wrote:

On Tue, 15 Dec 2009 03:51:01 -0800, Nedan Nedzatra Nedan
wrote:

Hia

How can I run a Userform without enabling ActiveX or Macros and without
getting into VB Editor? Is there any way to have the list of Userforms (just
like the list of Macros)on the main Word interface?

Can you help Mates?

Nedan Nedzatra


No. Userforms are absolutely dependent on macros. If macros are
disabled, the userform can't run.

It sounds like you may have the macro security level set to High,
disabling macros. Change it to Medium, and enable macros when you're
prompted on opening the document.

There is no list of userforms other than in the Project Explorer pane
on the VBA editor.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ:
http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
.

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Running Userform

I think I misunderstood your original post.

The proper way to run a userform is to write an ordinary macro in a module
(not in ThisDocument or a Class Module) that calls the userform. Greg
Maxey's article at
http://gregmaxey.mvps.org/Create_and...a_UserForm.htm shows a simple
example for displaying a userform named frmSurvey:

Sub CallUF()
Dim oFrm As frmSurvey
Set oFrm = New frmSurvey
oFrm.Show
Unload oFrm
Set oFrm = Nothing
End Sub

This macro will appear in the Macros dialog, and you can run it from there.

Another example is at
http://gregmaxey.mvps.org/Address_Le...h_UserForm.htm, for a
userform named myFrm, and because that macro is named AutoNew it will run
automatically when a new document is created from the template that contains
the macro and its userform.

Nedan Nedzatra wrote:
Hia

Thanks for responding Jay.

I am able to run User Forms from the VB Editor without enabling
Macros and ActiveX. I do it on Word 2007. I place the cursor on the
User Form in the VBE and click the Run Sub in the Run Menu or the
tringular icon in the ribbon. The codes are placed in Userform
Initialize.



"Jay Freedman" wrote:

On Tue, 15 Dec 2009 03:51:01 -0800, Nedan Nedzatra Nedan
wrote:

Hia

How can I run a Userform without enabling ActiveX or Macros and
without getting into VB Editor? Is there any way to have the list
of Userforms (just like the list of Macros)on the main Word
interface?

Can you help Mates?

Nedan Nedzatra


No. Userforms are absolutely dependent on macros. If macros are
disabled, the userform can't run.

It sounds like you may have the macro security level set to High,
disabling macros. Change it to Medium, and enable macros when you're
prompted on opening the document.

There is no list of userforms other than in the Project Explorer pane
on the VBA editor.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ:
http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit. .



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get a running header with running page numbers? rsw5060 Page Layout 2 December 9th 08 03:55 AM
Userform Template Bill d Microsoft Word Help 1 February 3rd 07 12:13 PM
Userform Sharpe Microsoft Word Help 1 March 17th 06 06:13 AM
Userform - .Range_ Michelle Microsoft Word Help 1 December 8th 05 02:45 AM
Running Macro from Word vs running macro from vb.net prog Simon New Users 0 July 16th 05 10:17 AM


All times are GMT +1. The time now is 06:44 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"