help me please(macro codes)

Joined
Jul 21, 2011
Messages
1
Reaction score
0
this is my codes
I don`t know where is the problem
it says sub or function not defined
please help



Sub FindFeeder()

Dim i, m, n, z, Setting_var_dc As Integer
Dim path As String
Dim DIName, OCName, DIfeeder, OCfeeder, OCfeederN, OCNameN As String
Dim station, Datei As Object
Dim ControlOC, ControlDI, flag_reg As Boolean
Dim Line_Name(0 To 300) As String

' Initialisation
ControlOC = False
ControlDI = False
FeederFound = False
path_dc = "G:\Azarbayjan"


If Different_Node = False Then
path = path_dc & "\" & RegionName

' Create FileSystemObject
Set fs = CreateObject("Scripting.FileSystemObject")

' Find active protection devices in the chosen region
Set f1 = fs.GetFolder(path + "\Protection")
Set f2 = f1.subfolders
End If

If Different_Node = True Then
GoTo jump
End If

For Each station In f2

jump:
' Open each prot-file in folder
If Different_Node Then
Set g2 = station2.Files
Else
Set g2 = station.Files
End If

For Each Datei In g2
If Different_Node Then
stationname = station2.Name
Else
stationname = station.Name
End If

flagDI = False
flagOC_both = False
flagOC = False
flagOCN = False
DIfeeder = ""
OCfeeder = ""
OCfeederN = ""
For z = 1 To 1
' If prot-file and voltage level >= 230kV then open it
If UCase(Left(Datei.Name, 4)) = "PROT" And Mid(Datei.Name, 6, 1) > 7 Then

wbook = Datei.Name
pathwbook = Datei.ParentFolder.path

Setting_var_dc = 0


If UCase(Left(Datei.Name, 4)) = "PROT" And Mid(Datei.Name, 6, 1) > 7 Then
Setting_var_dc = 0
wbook = Datei.Name
pathwbook = Datei.ParentFolder.path
End If
If getValue(pathwbook, wbook, "21_21N", 11, 4) <> "" And getValue(pathwbook, wbook, "21_21N", 11, 6) = "" Then
pathwbook.wbook("21_21N", 11, 6) = pathwbook.wbook("21_21N", 11, 4)
End If
End If
Next
Next
Next
End Sub
 
Last edited:
Joined
Jul 19, 2011
Messages
20
Reaction score
0
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top