Solved

VBA for EXCEL

Posted on 2001-06-20
4
185 Views
Last Modified: 2010-05-02


I have created a user form with a mulitsheet tab, called mulitsheet1 that has three tabs, which are called

GENERAL INFO     TROLLEY DETAILS     TROLLEY POSITION

On the GENERAL INFO sheet, there is an input box called weight, which asks for a value (integer).  There is a routine which checks to ensure that an integer value has been entered and will give a message if this is not the case.  I also want to prevent the user from being able to select different tabs, such as TROLLEY POSITION, until a value has been entered, but have not been able to successfully write a routine to do this.  I have written code in the ?click event? for the GENERAL INFO tab, that sets the event to false if the input value is not an integer, but is does not work..

I imagine this should be straightforward and involves using the index property, but I am becoming increasingly frustrated.  Could someone please advise on where I am going wrong and a sample of code I should incorporate into my module.



Regards,


anthony
0
Comment
Question by:AMcatear
4 Comments
 
LVL 8

Expert Comment

by:Navid
ID: 6211330
Could you paste the codes here? In this way, it will be easy to add and correct your lines instead of giving you totaly new lines.
For new changes I usually use
0
 
LVL 2

Accepted Solution

by:
TrueDrake earned 50 total points
ID: 6211331
Hi,

This is a VBA Excel solution:

If TabStrip1.Value = 1 Then
    TabStrip1.Value = 0
End If

You can't use Enable=False since it will disable all the tabs. You can only intercept a change and revert to another tab.

Enjoy
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7139594
Hi AMcatear,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept TrueDrake's comment(s) as an answer.

AMcatear, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7173278
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

808 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