Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBA for EXCEL

Posted on 2001-06-20
4
Medium Priority
?
192 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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 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…
Suggested Courses

688 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