111StepsAhead
New Member
- Joined
- Jun 3, 2011
- Messages
- 2
Hello MrExcel.com,
I have recently worked with some code (70% or so my own making) and am finding out that when I add a specific line to a Do While Loop the code will refuse to go past that line.
Basically I create an array of strings and fill it with values on my worksheet "Mode_Tracker_0001". (Picked the name because it was unique.) Anyways this worksheet has values that represent actual other worksheets in the workbook.
I know the array excepts the values but when I attempt to make the sheets that have the names in the array Visible (They all start out xlSheetsVeryHidden.) the code will end without continuing at all.
What I am asking is what reasons could their be for this happening? I was unable to reproduce the error in another workbook so hopefully this will help you help me.
I appreciate any insight to this issue.
Current version I am using is Excel 2007 in a Windows 7 Environment.
I have already posted a similar thread at
http://www.excelforum.com/excel-pro...gets-hung-up-on-visible-line.html#post2536881
with no luck. Thank you in advance for any help.
I have recently worked with some code (70% or so my own making) and am finding out that when I add a specific line to a Do While Loop the code will refuse to go past that line.
Code:
Dim Opes() As String
Dim iCount As Integer
Dim Max As Integer
Dim UserOption As Integer
Dim What_Button As Integer
Dim My_Sheet As String
Dim Last_Cell As String
Dim rng As Range
Select Case Click_Event
Case 1
Max = Worksheets("Mode_Tracker_0001").Range(Column & 65536).End(xlUp).row
ReDim Opes(1 To Max)
iCount = 1
MsgBox "Begin"
Do While iCount <= Max
Opes(iCount) = Worksheets("Mode_Tracker_0001").Range(Column & iCount).Value
Worksheets("Load").Visible = True
MsgBox "UNBELIEVABLE"
My_Sheet = Opes(iCount)
Worksheets("My_Sheet").Visible = True
'Worksheets("Mode_Tracker_0001").Range(Column & iCount).Visible = True
iCount = iCount + 1
Loop
UserOption = GetOption(Opes, 1, "Pick a worksheet.")
Basically I create an array of strings and fill it with values on my worksheet "Mode_Tracker_0001". (Picked the name because it was unique.) Anyways this worksheet has values that represent actual other worksheets in the workbook.
I know the array excepts the values but when I attempt to make the sheets that have the names in the array Visible (They all start out xlSheetsVeryHidden.) the code will end without continuing at all.
What I am asking is what reasons could their be for this happening? I was unable to reproduce the error in another workbook so hopefully this will help you help me.
I appreciate any insight to this issue.
Current version I am using is Excel 2007 in a Windows 7 Environment.
I have already posted a similar thread at
http://www.excelforum.com/excel-pro...gets-hung-up-on-visible-line.html#post2536881
with no luck. Thank you in advance for any help.