Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I have been using the code below with no problem and have just moved it to a new module and now it wont work ?? Any suggestions welcome, i am not a programmer but a dabbler & just cannot find the problem. Sub ChkForFiles() ' Dim sLCS As String, LCS As String, sIhKTL As String, ihKtl As String Dim sKTL As String, KTL As String Dim blnIhKtl As Boolean, blnKtl As Boolean, blnLCS As Boolean, ihSh As Boolean Dim ktlSh As Boolean sLCS = "\\zapad01\sapinter\LCS\" & mylcs & ".xls" blnLCS = Len(Dir(sLCS)) sIhKTL = "\\nv09002\tpdrive\Projects\General\50_Comparisons \KTL's\" & myKTLih & ".xls" blnIhKtl = Len(Dir(sIhKTL)) sKTL = "\\nv09002\tpdrive\Projects\General\50_Comparisons \KTL's\" & myKTL & ".xls" blnKtl = Len(Dir(sKTL)) If IfSheetExistsTestIH("\\nv09002\tpdrive\Projects\Ge neral\50_Comparisons\KTL's\" & myKTLih & ".xls", "TOOL TRACKING") = True Then ihSh = True If IfSheetExistsTest("\\nv09002\tpdrive\Projects\Gene ral\50_Comparisons\KTL's\" & myKTL & ".xls", "TOOL TRACKING") = True Then ktlSh = True End If End If If blnLCS = True Then If blnIhKtl = True Then If ihSh = True Then If blnKtl = True Then If ktlSh = True Then GetLcsdate**** Goes to Problem if all true ??? Else GoTo Problem End If Else GoTo Problem End If Else GoTo Problem End If Else GoTo Problem End If Else GoTo Problem End If Problem: With frmSelection.Label1 .Caption = "ONE OR MORE FILES/SHEETS NOT AVAILABLE:" & vbCrLf & vbCrLf & _ "LCS File Available : " & blnLCS & vbCrLf & _ "IH KTL File Available : " & blnIhKtl & vbCrLf & _ "Correct WorkSheet : " & ihSh & vbCrLf & _ "KTL File Available : " & blnKtl & vbCrLf & _ "Correct WorkSheet : " & ktlSh & vbCrLf & vbCrLf & _ "Click ""Reset"" to continue..." .Font.Name = "Arial" .Font.Size = 10 .Font.Bold = True .WordWrap = True .BackColor = RGB(255, 1, 52) End With End Sub -- Les |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with code problem | Excel Programming | |||
Problem with code | Excel Programming | |||
Code Problem | Excel Programming | |||
VB Code Problem | Excel Discussion (Misc queries) | |||
Code problem | Excel Programming |