#1   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 137
Default Error message

I am working in 2003 excel. I am trying to have the tabs not appear when i
open my excel program, because i have buttons that will open each page and
once they hit the back to home button it hids that tab again. Here is the
problem i am using the following code which i know is the reason i am getting
the error message but i don't know what else to use to keep the tabs hidden
when the book is opened, anyone have any other suggestions i have copied my
code below. It's a long code

Private Sub workbook_open()
'check for solver
If (CheckSolver = False) Then
MsgBox "Solver Add-In is not installed, you will not be able to
solve least costing on the Auto-Balance sheet. Consult Excel help for
information on installing the Solver Add-In."
End If
'load the expiry date from cell Expiration!B1
Expiry = getExpirationDate
rightNow = Date
'if we have expired, or moved to a different machine
If (Expiry = Empty Or rightNow Expiry Or Not
IsDataValid(getRegistrationNumber, getExpirationDate)) Then
showExpiryDialog
End If
'load the workbook
loadworkbook
End Sub

Private Sub loadworkbook()
Application.ScreenUpdating = False
changeVisibility InstructionsSheet, xlSheetVisible
InstructionsSheet.Activate
changeVisibility RequirementsSheet, xlSheetVisible
changeVisibility EvaluateSheet, xlSheetVisible
changeVisibility AutoBalanceSheet, xlSheetVisible
changeVisibility HerdDescriptionSheet, xlSheetVisible
changeVisibility IngredientsSheet, xlSheetVisible
changeVisibility MixSheet, xlSheetVisible
changeVisibility ReportsEVSheet, xlSheetVisible
changeVisibility ReportsLCSheet, xlSheetVisible
changeVisibility ErrorSheet, xlSheetVeryHidden
Application.ScreenUpdating = True
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
resetToStart
Geminator.Save
Application.ScreenUpdating = True
End Sub

Private Sub changeVisibility(Sheet As Worksheet, v As Integer)
unProtect "AmIn0"
Sheet.unProtect "AmIn0"
Sheet.Visible = v
Sheet.Protect "AmIn0"
Protect "AmIn0"
End Sub

Private Sub resetToStart()
changeVisibility ErrorSheet, xlSheetVisible
changeVisibility AutoBalanceSheet, xlSheetVeryHidden
changeVisibility EvaluateSheet, xlSheetVeryHidden
changeVisibility HerdDescriptionSheet, xlSheetVeryHidden
changeVisibility IngredientsSheet, xlSheetVeryHidden
changeVisibility MixSheet, xlSheetVeryHidden
changeVisibility InstructionsSheet, xlSheetVeryHidden
changeVisibility ReportsEVSheet, xlSheetVeryHidden
changeVisibility ReportsLCSheet, xlSheetVeryHidden
changeVisibility RequirementsSheet, xlSheetVeryHidden
setUseCount getUseCount + 1
If (getFirstUsed = Empty) Then
setFirstUsed Date
End If
Geminator.Protect "AmIn0"
End Sub

Private Sub showExpiryDialog()
registrationForm.regTextBox.SetFocus
registrationForm.regTextBox.SelStart = 0
registrationForm.regTextBox.SelLength =
Len(registrationForm.regTextBox.Text)
registrationForm.Show
End Sub


Private Sub Scrollarea()
Sheets("HerdDescription").Scrollarea = "24R:13C"
End Sub

Private Sub workbook_open()
Me.DisplayWorkbookTabs = False
End Sub

Thanks, BR
  #2   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 2,344
Default Error message

Hi,

when the code is run what line causes the error?

Does your routine try to hide all the sheets in the workbook? That is not
allowed, you must have at least one sheet visible.

--
Thanks,
Shane Devenshire


"Brenda" wrote:

I am working in 2003 excel. I am trying to have the tabs not appear when i
open my excel program, because i have buttons that will open each page and
once they hit the back to home button it hids that tab again. Here is the
problem i am using the following code which i know is the reason i am getting
the error message but i don't know what else to use to keep the tabs hidden
when the book is opened, anyone have any other suggestions i have copied my
code below. It's a long code

Private Sub workbook_open()
'check for solver
If (CheckSolver = False) Then
MsgBox "Solver Add-In is not installed, you will not be able to
solve least costing on the Auto-Balance sheet. Consult Excel help for
information on installing the Solver Add-In."
End If
'load the expiry date from cell Expiration!B1
Expiry = getExpirationDate
rightNow = Date
'if we have expired, or moved to a different machine
If (Expiry = Empty Or rightNow Expiry Or Not
IsDataValid(getRegistrationNumber, getExpirationDate)) Then
showExpiryDialog
End If
'load the workbook
loadworkbook
End Sub

Private Sub loadworkbook()
Application.ScreenUpdating = False
changeVisibility InstructionsSheet, xlSheetVisible
InstructionsSheet.Activate
changeVisibility RequirementsSheet, xlSheetVisible
changeVisibility EvaluateSheet, xlSheetVisible
changeVisibility AutoBalanceSheet, xlSheetVisible
changeVisibility HerdDescriptionSheet, xlSheetVisible
changeVisibility IngredientsSheet, xlSheetVisible
changeVisibility MixSheet, xlSheetVisible
changeVisibility ReportsEVSheet, xlSheetVisible
changeVisibility ReportsLCSheet, xlSheetVisible
changeVisibility ErrorSheet, xlSheetVeryHidden
Application.ScreenUpdating = True
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
resetToStart
Geminator.Save
Application.ScreenUpdating = True
End Sub

Private Sub changeVisibility(Sheet As Worksheet, v As Integer)
unProtect "AmIn0"
Sheet.unProtect "AmIn0"
Sheet.Visible = v
Sheet.Protect "AmIn0"
Protect "AmIn0"
End Sub

Private Sub resetToStart()
changeVisibility ErrorSheet, xlSheetVisible
changeVisibility AutoBalanceSheet, xlSheetVeryHidden
changeVisibility EvaluateSheet, xlSheetVeryHidden
changeVisibility HerdDescriptionSheet, xlSheetVeryHidden
changeVisibility IngredientsSheet, xlSheetVeryHidden
changeVisibility MixSheet, xlSheetVeryHidden
changeVisibility InstructionsSheet, xlSheetVeryHidden
changeVisibility ReportsEVSheet, xlSheetVeryHidden
changeVisibility ReportsLCSheet, xlSheetVeryHidden
changeVisibility RequirementsSheet, xlSheetVeryHidden
setUseCount getUseCount + 1
If (getFirstUsed = Empty) Then
setFirstUsed Date
End If
Geminator.Protect "AmIn0"
End Sub

Private Sub showExpiryDialog()
registrationForm.regTextBox.SetFocus
registrationForm.regTextBox.SelStart = 0
registrationForm.regTextBox.SelLength =
Len(registrationForm.regTextBox.Text)
registrationForm.Show
End Sub


Private Sub Scrollarea()
Sheets("HerdDescription").Scrollarea = "24R:13C"
End Sub

Private Sub workbook_open()
Me.DisplayWorkbookTabs = False
End Sub

Thanks, BR

  #3   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 137
Default Error message

I get the follow message when i open up the program: Compile error in hidden
module. I understand that i have to have atleast on tab open. A lot of this
wasn't designed by me. I looked up what that meant and nothing is password
protected at least where i can see.

Please understand all of this is brand new to me and i am flyi ng by the
seat of my pants.
--
Thank you, Brenda


"ShaneDevenshire" wrote:

Hi,

when the code is run what line causes the error?

Does your routine try to hide all the sheets in the workbook? That is not
allowed, you must have at least one sheet visible.

--
Thanks,
Shane Devenshire


"Brenda" wrote:

I am working in 2003 excel. I am trying to have the tabs not appear when i
open my excel program, because i have buttons that will open each page and
once they hit the back to home button it hids that tab again. Here is the
problem i am using the following code which i know is the reason i am getting
the error message but i don't know what else to use to keep the tabs hidden
when the book is opened, anyone have any other suggestions i have copied my
code below. It's a long code

Private Sub workbook_open()
'check for solver
If (CheckSolver = False) Then
MsgBox "Solver Add-In is not installed, you will not be able to
solve least costing on the Auto-Balance sheet. Consult Excel help for
information on installing the Solver Add-In."
End If
'load the expiry date from cell Expiration!B1
Expiry = getExpirationDate
rightNow = Date
'if we have expired, or moved to a different machine
If (Expiry = Empty Or rightNow Expiry Or Not
IsDataValid(getRegistrationNumber, getExpirationDate)) Then
showExpiryDialog
End If
'load the workbook
loadworkbook
End Sub

Private Sub loadworkbook()
Application.ScreenUpdating = False
changeVisibility InstructionsSheet, xlSheetVisible
InstructionsSheet.Activate
changeVisibility RequirementsSheet, xlSheetVisible
changeVisibility EvaluateSheet, xlSheetVisible
changeVisibility AutoBalanceSheet, xlSheetVisible
changeVisibility HerdDescriptionSheet, xlSheetVisible
changeVisibility IngredientsSheet, xlSheetVisible
changeVisibility MixSheet, xlSheetVisible
changeVisibility ReportsEVSheet, xlSheetVisible
changeVisibility ReportsLCSheet, xlSheetVisible
changeVisibility ErrorSheet, xlSheetVeryHidden
Application.ScreenUpdating = True
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
resetToStart
Geminator.Save
Application.ScreenUpdating = True
End Sub

Private Sub changeVisibility(Sheet As Worksheet, v As Integer)
unProtect "AmIn0"
Sheet.unProtect "AmIn0"
Sheet.Visible = v
Sheet.Protect "AmIn0"
Protect "AmIn0"
End Sub

Private Sub resetToStart()
changeVisibility ErrorSheet, xlSheetVisible
changeVisibility AutoBalanceSheet, xlSheetVeryHidden
changeVisibility EvaluateSheet, xlSheetVeryHidden
changeVisibility HerdDescriptionSheet, xlSheetVeryHidden
changeVisibility IngredientsSheet, xlSheetVeryHidden
changeVisibility MixSheet, xlSheetVeryHidden
changeVisibility InstructionsSheet, xlSheetVeryHidden
changeVisibility ReportsEVSheet, xlSheetVeryHidden
changeVisibility ReportsLCSheet, xlSheetVeryHidden
changeVisibility RequirementsSheet, xlSheetVeryHidden
setUseCount getUseCount + 1
If (getFirstUsed = Empty) Then
setFirstUsed Date
End If
Geminator.Protect "AmIn0"
End Sub

Private Sub showExpiryDialog()
registrationForm.regTextBox.SetFocus
registrationForm.regTextBox.SelStart = 0
registrationForm.regTextBox.SelLength =
Len(registrationForm.regTextBox.Text)
registrationForm.Show
End Sub


Private Sub Scrollarea()
Sheets("HerdDescription").Scrollarea = "24R:13C"
End Sub

Private Sub workbook_open()
Me.DisplayWorkbookTabs = False
End Sub

Thanks, BR

  #4   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 137
Default Error message

Private Sub loadWorkbook() is what is highlighted in blue when i check run
--
Thank you, Brenda


"ShaneDevenshire" wrote:

Hi,

when the code is run what line causes the error?

Does your routine try to hide all the sheets in the workbook? That is not
allowed, you must have at least one sheet visible.

--
Thanks,
Shane Devenshire


"Brenda" wrote:

I am working in 2003 excel. I am trying to have the tabs not appear when i
open my excel program, because i have buttons that will open each page and
once they hit the back to home button it hids that tab again. Here is the
problem i am using the following code which i know is the reason i am getting
the error message but i don't know what else to use to keep the tabs hidden
when the book is opened, anyone have any other suggestions i have copied my
code below. It's a long code

Private Sub workbook_open()
'check for solver
If (CheckSolver = False) Then
MsgBox "Solver Add-In is not installed, you will not be able to
solve least costing on the Auto-Balance sheet. Consult Excel help for
information on installing the Solver Add-In."
End If
'load the expiry date from cell Expiration!B1
Expiry = getExpirationDate
rightNow = Date
'if we have expired, or moved to a different machine
If (Expiry = Empty Or rightNow Expiry Or Not
IsDataValid(getRegistrationNumber, getExpirationDate)) Then
showExpiryDialog
End If
'load the workbook
loadworkbook
End Sub

Private Sub loadworkbook()
Application.ScreenUpdating = False
changeVisibility InstructionsSheet, xlSheetVisible
InstructionsSheet.Activate
changeVisibility RequirementsSheet, xlSheetVisible
changeVisibility EvaluateSheet, xlSheetVisible
changeVisibility AutoBalanceSheet, xlSheetVisible
changeVisibility HerdDescriptionSheet, xlSheetVisible
changeVisibility IngredientsSheet, xlSheetVisible
changeVisibility MixSheet, xlSheetVisible
changeVisibility ReportsEVSheet, xlSheetVisible
changeVisibility ReportsLCSheet, xlSheetVisible
changeVisibility ErrorSheet, xlSheetVeryHidden
Application.ScreenUpdating = True
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
resetToStart
Geminator.Save
Application.ScreenUpdating = True
End Sub

Private Sub changeVisibility(Sheet As Worksheet, v As Integer)
unProtect "AmIn0"
Sheet.unProtect "AmIn0"
Sheet.Visible = v
Sheet.Protect "AmIn0"
Protect "AmIn0"
End Sub

Private Sub resetToStart()
changeVisibility ErrorSheet, xlSheetVisible
changeVisibility AutoBalanceSheet, xlSheetVeryHidden
changeVisibility EvaluateSheet, xlSheetVeryHidden
changeVisibility HerdDescriptionSheet, xlSheetVeryHidden
changeVisibility IngredientsSheet, xlSheetVeryHidden
changeVisibility MixSheet, xlSheetVeryHidden
changeVisibility InstructionsSheet, xlSheetVeryHidden
changeVisibility ReportsEVSheet, xlSheetVeryHidden
changeVisibility ReportsLCSheet, xlSheetVeryHidden
changeVisibility RequirementsSheet, xlSheetVeryHidden
setUseCount getUseCount + 1
If (getFirstUsed = Empty) Then
setFirstUsed Date
End If
Geminator.Protect "AmIn0"
End Sub

Private Sub showExpiryDialog()
registrationForm.regTextBox.SetFocus
registrationForm.regTextBox.SelStart = 0
registrationForm.regTextBox.SelLength =
Len(registrationForm.regTextBox.Text)
registrationForm.Show
End Sub


Private Sub Scrollarea()
Sheets("HerdDescription").Scrollarea = "24R:13C"
End Sub

Private Sub workbook_open()
Me.DisplayWorkbookTabs = False
End Sub

Thanks, BR

  #5   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 2,344
Default Error message

Hi,

Well then the first thing we should try is to turn on Solver. In Excel
choose Tools, Add-Ins, and check the box beside Solver.

Then try running your code again and let me know where it stops. When an
error occurs Excel usually pops up a dialog box which allows you to choose
Debug, that's the one you want.

Then note the line that is usually yellow.

--
Thanks,
Shane Devenshire


"Brenda" wrote:

Private Sub loadWorkbook() is what is highlighted in blue when i check run
--
Thank you, Brenda


"ShaneDevenshire" wrote:

Hi,

when the code is run what line causes the error?

Does your routine try to hide all the sheets in the workbook? That is not
allowed, you must have at least one sheet visible.

--
Thanks,
Shane Devenshire


"Brenda" wrote:

I am working in 2003 excel. I am trying to have the tabs not appear when i
open my excel program, because i have buttons that will open each page and
once they hit the back to home button it hids that tab again. Here is the
problem i am using the following code which i know is the reason i am getting
the error message but i don't know what else to use to keep the tabs hidden
when the book is opened, anyone have any other suggestions i have copied my
code below. It's a long code

Private Sub workbook_open()
'check for solver
If (CheckSolver = False) Then
MsgBox "Solver Add-In is not installed, you will not be able to
solve least costing on the Auto-Balance sheet. Consult Excel help for
information on installing the Solver Add-In."
End If
'load the expiry date from cell Expiration!B1
Expiry = getExpirationDate
rightNow = Date
'if we have expired, or moved to a different machine
If (Expiry = Empty Or rightNow Expiry Or Not
IsDataValid(getRegistrationNumber, getExpirationDate)) Then
showExpiryDialog
End If
'load the workbook
loadworkbook
End Sub

Private Sub loadworkbook()
Application.ScreenUpdating = False
changeVisibility InstructionsSheet, xlSheetVisible
InstructionsSheet.Activate
changeVisibility RequirementsSheet, xlSheetVisible
changeVisibility EvaluateSheet, xlSheetVisible
changeVisibility AutoBalanceSheet, xlSheetVisible
changeVisibility HerdDescriptionSheet, xlSheetVisible
changeVisibility IngredientsSheet, xlSheetVisible
changeVisibility MixSheet, xlSheetVisible
changeVisibility ReportsEVSheet, xlSheetVisible
changeVisibility ReportsLCSheet, xlSheetVisible
changeVisibility ErrorSheet, xlSheetVeryHidden
Application.ScreenUpdating = True
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
resetToStart
Geminator.Save
Application.ScreenUpdating = True
End Sub

Private Sub changeVisibility(Sheet As Worksheet, v As Integer)
unProtect "AmIn0"
Sheet.unProtect "AmIn0"
Sheet.Visible = v
Sheet.Protect "AmIn0"
Protect "AmIn0"
End Sub

Private Sub resetToStart()
changeVisibility ErrorSheet, xlSheetVisible
changeVisibility AutoBalanceSheet, xlSheetVeryHidden
changeVisibility EvaluateSheet, xlSheetVeryHidden
changeVisibility HerdDescriptionSheet, xlSheetVeryHidden
changeVisibility IngredientsSheet, xlSheetVeryHidden
changeVisibility MixSheet, xlSheetVeryHidden
changeVisibility InstructionsSheet, xlSheetVeryHidden
changeVisibility ReportsEVSheet, xlSheetVeryHidden
changeVisibility ReportsLCSheet, xlSheetVeryHidden
changeVisibility RequirementsSheet, xlSheetVeryHidden
setUseCount getUseCount + 1
If (getFirstUsed = Empty) Then
setFirstUsed Date
End If
Geminator.Protect "AmIn0"
End Sub

Private Sub showExpiryDialog()
registrationForm.regTextBox.SetFocus
registrationForm.regTextBox.SelStart = 0
registrationForm.regTextBox.SelLength =
Len(registrationForm.regTextBox.Text)
registrationForm.Show
End Sub


Private Sub Scrollarea()
Sheets("HerdDescription").Scrollarea = "24R:13C"
End Sub

Private Sub workbook_open()
Me.DisplayWorkbookTabs = False
End Sub

Thanks, BR

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
Error Message DMD31842[_2_] New Users to Excel 3 April 5th 08 07:07 PM
VBA Error Message "Compile Error...." Steve Excel Discussion (Misc queries) 3 July 15th 05 09:20 AM
It's me again!! Error message. Pgsmom Excel Discussion (Misc queries) 12 March 18th 05 11:03 AM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 08:46 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"