|
-
Jun 27th, 2005, 09:03 PM
#1
Thread Starter
Lively Member
Is it possible to only open the form?
Hi,
I would like to know if it is possible to run a form that is in a excel file without having the excel file open up but only the form? Thanx
Last edited by sand; Jun 27th, 2005 at 09:20 PM.
-
Jun 27th, 2005, 10:28 PM
#2
Re: Is it possible to only open the form?
Probably just show the userform modeless and move the Excel main window off the screen.
VB Code:
Private Sub Workbook_Open()
UserForm1.Show vbModeless
Application.WindowState = xlNormal
Application.Left = -10000
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 27th, 2005, 10:41 PM
#3
Thread Starter
Lively Member
Re: Is it possible to only open the form?
Thanx. But I have a macro that opens the file before it runs. How do i only run the file in the background, so that the user need not open the file.
-
Jun 27th, 2005, 11:09 PM
#4
Re: Is it possible to only open the form?
You have a macro that opens the file then the code I posted will run when its opened.
You can not show the userform without opening the Excel workbook too. Thats why my code moves the Excel app off the viewable
part of the screen.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jun 27th, 2005, 11:50 PM
#5
Thread Starter
Lively Member
Re: Is it possible to only open the form?
Does that mean whenever users want to use a form, which makes use of other excel files, they have open up all the files asscoicated with it?
-
Jun 28th, 2005, 12:00 AM
#6
Re: Is it possible to only open the form?
Whichever xls file contains the UserForm must be opened. If you were running macros in another fille then that wouldnt need to be
explicitly opened. Even with that Excel creates a child process of that workbook so it can reference the functions/methods.
Sounds like your trying to create an Excel Add-In out of one or more workbooks (.xls)?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|