Solved

splash screen

Posted on 1998-10-06
8
564 Views
Last Modified: 2011-04-14
I am trying to create a splash screen in vba for when I open up my program in excel. When it opens up the form does not allow any events to happen in the background until the form is closed.Does anyone know how to do this?
0
Comment
Question by:pandrusy
8 Comments
 

Expert Comment

by:FlyveHest
ID: 1438377
You need to make the window NON modal.  When you want to show your splash form you should call it like this

<formname>.show

And nothing else.  My guess is that you have a ,1 put in there somewhere, and this makes the window modal.
0
 

Author Comment

by:pandrusy
ID: 1438378
Ive made the form with just .show it doesn't matter. I think it is a vba limitation. The effect that I am really trying to get is when the user clicks on the icon have the splash screen come up like when you open up word or excel, and execute the opening of excel and the program in the background, then close once the opening sequence is completed.
0
 

Expert Comment

by:jasonellis
ID: 1438379
have you tried
DoEvents
?
0
 

Author Comment

by:pandrusy
ID: 1438380
I have now switched to a vb exe and am using the built in splash screen. Check out this code. Everything runs perfectly but when excel comes up it is read only.

Sub Main()
Dim exclapp As Object

frmSplash.Show
Set exclapp = CreateObject("Excel.Application")

   
    frmSplash.Refresh
   
    exclapp.workbooks.Open "My workbook that I am using"
    exclapp.Run "Auto_Open"
   
   
   
   
    Unload frmSplash
    exclapp.Visible = True
   

   
End Sub
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Expert Comment

by:TDragon
ID: 1438381
I don't know if your Late Binding will work using the following early binding code example, but it might.  I followed your code and came up with the same response that you did (Read Only), this method worked however...

    Dim exapp As Excel.Application
    Dim exbook As Excel.workbooks
   
   
    Set exapp = CreateObject("Excel.Application")
    Set exbooks = exapp.workbooks
   
    exapp.Visible = True
    exbooks.Open "My workbook that I am using"
    exapp.Run "Auto_Open"

    ...
   
    exbooks.Close
    exapp.Quit
   
    Set exbooks = Nothing
    Set exapp = Nothing


0
 
LVL 3

Expert Comment

by:vmano
ID: 1438382
i tried your code and works for me, i mean Excel opens up as normal and i can read/write. i am not sure why Excel is opening as read only. here is the code that i tried.(pretty much same as yours)

Dim ExcelObj As Object
frmSplash.Show
Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.workbooks.Open "C:\Manohar\Finance.xls"
frmSplash.Refresh
'ExcelObj.Run "Auto_Open"
Unload frmSplash
ExcelObj.Visible = True
End Sub

0
 

Author Comment

by:pandrusy
ID: 1438383
I figured it out myself using screen updating. Thanks for all the help though.
0
 
LVL 1

Accepted Solution

by:
Jhunt earned 200 total points
ID: 1438384
Try showing the form as modal and put this inside the form_load.

sub Form_Load

me.show 'show form
doevents' make sure form is shown
DoStuff 'a subroutine where what you want done is done

unload me


end sub
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…
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…

932 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

8 Experts available now in Live!

Get 1:1 Help Now