Solved

VBA for EXCEL

Posted on 2001-06-20
4
183 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now