Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel VBA Form problem

ok this is for my a-level coursework... i have nearly completed it but i
wanted to make it a bit better by adding a custom form to let the user
make a selection.

Ok i have made my form and all the buttons on it and their functions
but i just cannot get the form to appear. I just want the form to
appear when i click on a button.

My form is called question and this is the code i am using to try and
run it:

Sub Question()
Question.Show
End Sub

I know it's completely wrong but i've never really used VB before and
the microsoft help is rubbish.
Please help!!


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Excel VBA Form problem

Matt

The open form macro should also be in a general module and
not the form module. I presume you are going to assing a
button to the macro are you will also have to remove the
Private statement.

Regards
Peter
-----Original Message-----
Matt;

To overcome confusions, give your forms any name

preceding with frm.
Don't give it the same name as the Procedure which is

also called question.

So:

Private Sub frmQuestion_Show()
frmQuestion.Show
End Sub

Mark.

More Excel ? www.rosenkrantz.nl or


----------------------------------------------------------

----------

"Matt000 " wrote

in message
...
ok this is for my a-level coursework... i have nearly

completed it but i
wanted to make it a bit better by adding a custom form

to let the user
make a selection.

Ok i have made my form and all the buttons on it and

their functions
but i just cannot get the form to appear. I just want

the form to
appear when i click on a button.

My form is called question and this is the code i am

using to try and
run it:

Sub Question()
Question.Show
End Sub

I know it's completely wrong but i've never really used

VB before and
the microsoft help is rubbish.
Please help!!


---
Message posted from
http://www.ExcelForum.com/



.

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
Problem with links form a word file to excel graphs SavvasC Links and Linking in Excel 3 June 23rd 09 08:00 AM
User Form Problem DCSwearingen Excel Discussion (Misc queries) 0 December 29th 05 11:04 PM
Excel VBA - User form caption problem xlnoobie Excel Programming 2 February 7th 04 06:21 PM
Width problem with Form David Coleman Excel Programming 3 January 2nd 04 03:07 PM
Excel User Form problem humet Excel Programming 5 December 11th 03 09:37 PM


All times are GMT +1. The time now is 10:51 PM.

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

About Us

"It's about Microsoft Excel"