?
Solved

Modeless UserForm-VBA

Posted on 2005-03-03
9
Medium Priority
?
1,485 Views
Last Modified: 2012-06-27
I've an excel sheet. On changing the content of the cell I would like to display a modeless form which require some user input.

How do I display such a modeless form ( I do not want to use showmodal kind of properties )

TIA
RAJ.
0
Comment
Question by:krisrajz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
9 Comments
 
LVL 50

Accepted Solution

by:
Dave Brett earned 2000 total points
ID: 13447976
Hi RAJ,

If you wanted a modal form whenevr the value in A1 changed then you would use a sheet change event like below. The code assumed you have a userform called UserForm1

right click the sheet tab on the sheet where you want to trigger the form
View - Code
paste the code below

Public Mycell As String

Private Sub Worksheet_Change(ByVal Target As Range)
'leave if the wrong cell is changed ir the new value is not different
    If Target.Address <> "$A$1" Or Target.Value = Mycell Then Exit Sub
    Mycell = Target.Value
    UserForm1.Show vbModeless
End Sub






Cheers

Dave
0
 
LVL 1

Author Comment

by:krisrajz
ID: 13448021
OOPS!. Did not you know that the UserForm does accept vbModeless argument?

or

My versions of VBA IDE does not let me pass on the vbModeless argument

Please checkout.

RAJ.
0
 
LVL 50

Expert Comment

by:Dave Brett
ID: 13448123
RAJ

Modeless forms have been available in Excel VBA from version 2000 and up.

Dave
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:krisrajz
ID: 13456262
Please close the thread as there is no useful replies.

THANX

RAJ.
0
 
LVL 50

Expert Comment

by:Dave Brett
ID: 13456269
RAJ - your question was answered as asked.
0
 
LVL 50

Expert Comment

by:Dave Brett
ID: 13702860
My view is that this question was clearly answered.

Cheers

Dave
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question