UserForm "Errors occured during load" in '97 :: MrExcel Message Board


 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

UserForm "Errors occured during load" in '97
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

tbardoni
Board Master
Board  Master


Joined: 30 Aug 2002
Posts: 1613
Location: Rochester, MI USA
Flag: Usa

Status: Offline

 Reply with quote  

UserForm "Errors occured during load" in '97

I created a spreadsheet in XL 2002 that has a UserFrom. When I run the sheet in XL '97 I get a "Errors occured during load" message when trying to load the UserForm. I can't figure out why.

code:
Sub ToggleInputBox()
    If InputForm.Visible = True Then
            InputForm.Hide
        Else
            InputForm.Show
    End If
End Sub



code:
Private Sub UserForm_Initialize()
     TextBox1.Value = Application.UserName
     MonthlyLedger.[B4] = TextBox1.Value
End Sub



_________________
Board Nit
Dyslexics of the World Untie!

Post Sun Sep 21, 2003 12:18 am 
 View user's profile Send private message Send e-mail AIM Address MSN Messenger

Ivan F Moala
MrExcel MVP


Joined: 11 Feb 2002
Posts: 3211
Location: Auckland, New Zealand
Flag: Newzealand

Status: Offline

 Reply with quote  

Hi tbardoni

Whilst most code for Xl2003 will be compatible with earlier
versions, you probably have some setting there that is not supported by Xl97. For example making Userforms Modal
is not supported by Xl97. Check to see if you have a setting or control that is not avial for Xl97.
_________________
Kind Regards,
Ivan F Moala From the City of Sails

Post Sun Sep 21, 2003 4:17 am 
 View user's profile Send private message Send e-mail Visit poster's website

tbardoni
Board Master
Board  Master


Joined: 30 Aug 2002
Posts: 1613
Location: Rochester, MI USA
Flag: Usa

Status: Offline

 Reply with quote  

Re: UserForm "Errors occured during load" in '97

Thanks, Ivan. I did have ShowModal=True, but I was still getting an error. So, I decided to cheat a little and put On Error Resume Next at the top of my code and now it works fine. I'll have to do a little more testing to make sure its running properly, but so far, it looks promising.

Thanks again for your help!

Todd
_________________
Board Nit
Dyslexics of the World Untie!

Post Sun Sep 21, 2003 4:49 am 
 View user's profile Send private message Send e-mail AIM Address MSN Messenger

Ivan F Moala
MrExcel MVP


Joined: 11 Feb 2002
Posts: 3211
Location: Auckland, New Zealand
Flag: Newzealand

Status: Offline

 Reply with quote  

You could put in conditional compilation code @ load time to test for which VBA version so that it can handle the switch from 2003 to 97 eg.

code:

Sub Loader()
'// Lets test which System
#If VBA6 Then
    UserForm1.Show False
#Else
    UserForm1.Show
#End If

End Sub





Note: make sure you do not set System Modal in your userform control.
_________________
Kind Regards,
Ivan F Moala From the City of Sails

Post Sun Sep 21, 2003 5:19 am 
 View user's profile Send private message Send e-mail Visit poster's website

tbardoni
Board Master
Board  Master


Joined: 30 Aug 2002
Posts: 1613
Location: Rochester, MI USA
Flag: Usa

Status: Offline

 Reply with quote  

Re: UserForm "Errors occured during load" in '97

Thanks a bunch Ivan. You've given me some ideas.
_________________
Board Nit
Dyslexics of the World Untie!

Post Sun Sep 21, 2003 12:00 pm 
 View user's profile Send private message Send e-mail AIM Address MSN Messenger
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.