Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Userform show problem...

I'm having a problem with my userform not showing. I'll explain her
with some code. in the Workbook_Open procedure I have...


Code
-------------------
Sub Workbook_open()
Unload Controls
If ActiveWorkbook.Path = "" And Left(ActiveWorkbook.Name, 4) < "Book" Or ActiveWorkbook.FileFormat = xlTemplate Then
Dim ans3
ans3 = MsgBox("Do you really want to create a new invoice? Once created the Invoice number is final. ", vbYesNo, "FINAL!!! Create New Invoice?")
If ans3 = vbYes Then
Dim InvNo&
'Do not assign new inv nbr if the original template has been opened
If ActiveWorkbook.Path = "" And Left(ActiveWorkbook.Name, 4) < "Book" Or ActiveWorkbook.FileFormat = xlTemplate Then
'If O3 does not contain anything, enter the next inv nbr
If [P3] = "" Then
'Get next inv nbr
InvNo = GetSetting("XLInvoices", "Invoices", "CurrentNo", 1000) + 1
'Enter the inv nbr in A1
[P3] = InvNo
'Save the inv nbr
SaveSetting "XLInvoices", "Invoices", "CurrentNo", InvNo
'Put todays date in O4
[P4] = Date
End If
End If
End If
End If
If ans3 = vbNo Then
Application.Quit
End If
If ActiveWorkbook.Path = "" And Left(ActiveWorkbook.Name, 4) < "Book" Or ActiveWorkbook.FileFormat = xlTemplate Then
ActiveWorkbook.Sheets("Product List").Visible = False
ActiveWorkbook.Sheets("CustomerInfo").Visible = False
Else
ActiveWorkbook.Sheets("Product List").Visible = False
ActiveWorkbook.Sheets("CustomerInfo").Visible = False
End If
If ActiveWorkbook.Path = "" And Left(ActiveWorkbook.Name, 4) < "Book" Or ActiveWorkbook.FileFormat = xlTemplate Then
Dim FromQuote
FromQuote = MsgBox("Are you importing from the QuoteMaker?", vbYesNo, "Import from QuoteMaker?")
If FromQuote = vbYes Then Exit Sub
If FromQuote = vbNo Then
InfoPagesInvoice.Show
End If
Else: Exit Sub
End If
End Su
-------------------


And when I first open the template this works exactly like it i
supposed to, and the userform shows...however, when I go through th
rest of the process, and then finally save the template as .xlt an
call the workbook_open procedure again everything works except for th
userform being shown. There is no error code either, it just simpl
doesn't show. Anyone have any ideas

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OnAction to show a userform Todd Huttenstine Excel Programming 1 May 7th 04 04:17 PM
How to Show a userform from XLA sub Thibault Excel Programming 1 December 8th 03 03:36 PM
Userform.hide / show papou[_7_] Excel Programming 0 September 15th 03 03:12 PM
show a userform Joe[_17_] Excel Programming 0 July 18th 03 03:25 PM


All times are GMT +1. The time now is 06:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"