Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

VBA for EXCEL

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

Technology Partners: 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!

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

972 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