Solved

VBA for EXCEL

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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

738 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