Zaslal/a
3.4.2015 3:20Ahoj,
prosím o pomoc,při otvirání souborů mě to hodí runtime error 1004,že nemůže otevřít soubor,soubor existuje,první soubory to otevře v pořádku,budu vděčný za každou radu
Private Sub WODOWN_Click()
Windows("VYTAHDWS").Activate
Sheets("PP").Select
Dim x As Long
For x = 2 To 1000
For e = 2 To 1000
If Cells(x, 6) = ComboBox1.Value And Cells(x, 5) = ComboBox2.Value Then
Workbooks.Open Filename:= _
"http://10.17.196.142/MaterialManagement/Reports/ResultPageFullScreenLight.aspx?type=apsc_dps_lite&PlanID=" & Cells(x, 1).Value
ActiveWindow.Visible = False
Windows("ResultPageFullScreenLight.aspx").Visible = True
Windows("ResultPageFullScreenLight.aspx").Activate
For i = 2 To 2000
If Cells(i, 1).Value = "WO" Then
Range("A" & i + 1 & ":A" & LastRowInOneColumn("A")).Select
Selection.Copy
Windows("VYTAHDWS").Activate
Sheets("WO").Select
Range("A" & LastRowInOneColumn("A") + 1).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Windows("ResultPageFullScreenLight.aspx").Activate
Sheets("PP").Select
Range("H1").Select
Selection.Copy
Windows("VYTAHDWS").Activate
Sheets("WO").Select
Range("B" & LastRowInOneColumn("B") + 1 & ":B" & LastRowInOneColumn("A")).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Columns("A:B").Select
With Selection.Font
.Name = "Arial"
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With Selection.Font
.Name = "Arial"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
End With
With Selection
.HorizontalAlignment = xlCenter
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Windows("ResultPageFullScreenLight.aspx").Activate
Application.CutCopyMode = False
Windows("ResultPageFullScreenLight.aspx").Close savechanges:=False
Windows("VYTAHDWS").Activate
Sheets("PP").Select
End If
Next i
End If
Next x
Sheets("WO").Select
Range("C" & LastRowInOneColumn("C") + 1 & ":C" & LastRowInOneColumn("B")).Select
Selection.FormulaR1C1 = "=VLOOKUP(RC[-1],PP!R2C1:R500C6,2,FALSE)"
Range("D" & LastRowInOneColumn("D") + 1 & ":D" & LastRowInOneColumn("C")).Select
Selection.FormulaR1C1 = "=VLOOKUP(RC[-2],PP!R2C1:R500C6,5,FALSE)"
Range("E" & LastRowInOneColumn("E") + 1 & ":E" & LastRowInOneColumn("D")).Select
Selection.FormulaR1C1 = "=VLOOKUP(RC[-3],PP!R2C1:R500C6,6,FALSE)"
MsgBox "WO staženy ! "
End Sub
Jirkapce napsal/a:
AHoj,otevre to odkaz,zkopiruje data a zavre,prnich par souboru to otevre pak to hodi error,kdyz ten odkaz otevru rucne,tak to jde,kdyz dam dabug pokracovat,tak to dobehne do konce,priloha nebude k nicemu,protoze odkaz neotevres
Oblíbený formulář Faktura byl vylepšen a rozšířen.
Více se dočtete zde.
Používáte podnikový systém Helios iNuvio? Potřebujete pomoci se správou nebo vyvinout SQL proceduru? Více informací naleznete na stránce Helios iNuvio.