ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Two Excel VBA Quezzies (https://www.excelbanter.com/excel-programming/362930-two-excel-vba-quezzies.html)

Omega[_2_]

Two Excel VBA Quezzies
 
First question,
Is there any way to get a listing of system and/or user data sources
from a VBA app?

Second question,
Is there any way to have a form that is displayed show WHILE Excel is
minimized? So far I can get the form to show and Excel to minimize,
but it takes the form with it. Interestingly enough, if I click the
taskbar entry for the program, only the foreground form displays. But
if I programatically manipulate Excel to be maximized (or normal), the
whole program comes back.

This is purely aesthetics, but I'd like to be able to develop a nice
polished interface where possible. If anyone is wise in the ways of
Excel and it's events and objects, this is a tricky one.



I'm sure there are more to come! Thank you in advance to anyone who
responds.

- Alexander Trauzzi


Dave Peterson

Two Excel VBA Quezzies
 
I don't know #1.

But both of these worked ok for me:

Option Explicit
Sub testme()
Application.Visible = False
UserForm1.Show
Application.Visible = True
End Sub
Sub testme2()
Application.WindowState = xlMinimized
UserForm1.Show
Application.WindowState = xlMaximized
End Sub


The first sub hid the application. The second minimized it.

But then the userform was floating over a different application for me (I didn't
like it).

Omega wrote:

First question,
Is there any way to get a listing of system and/or user data sources
from a VBA app?

Second question,
Is there any way to have a form that is displayed show WHILE Excel is
minimized? So far I can get the form to show and Excel to minimize,
but it takes the form with it. Interestingly enough, if I click the
taskbar entry for the program, only the foreground form displays. But
if I programatically manipulate Excel to be maximized (or normal), the
whole program comes back.

This is purely aesthetics, but I'd like to be able to develop a nice
polished interface where possible. If anyone is wise in the ways of
Excel and it's events and objects, this is a tricky one.

I'm sure there are more to come! Thank you in advance to anyone who
responds.

- Alexander Trauzzi


--

Dave Peterson


All times are GMT +1. The time now is 07:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com