"Sti-systemet" i Mac excel 2011 fra Windows
Hejsa,Jeg har en excel-fil liggende på et NAS-drev, så flere computere kan tilgå filen. Nu er problemet bare, at der er kommet en "MAC" computer ind i huset!!!!
Langt de fleste af makroerne fungerer 100% på Mac'en, men dog er der problemer når det gælder at gemme på netværksdrevet - og i det hele taget at finde den korrekte sti.
Følgende kode fungerer upåklageligt på Windows, men hvilke ændringer kan jeg foretage, for at filen fungerer på begge systemer?
Kode:
---
Sub pris()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
Dim myPath As String
myPath = ActiveWorkbook.Path
Dim fnavn As String
Dim strPath As String
Dim strFileName As String
Range("A:Y").Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'Udskift stien med den ønskede sti
If Len(Dir(myPath & "\Giro\", vbDirectory)) = 0 Then
MkDir myPath & "\Giro\"
End If
strPath = myPath & "\Giro\"
Application.DisplayAlerts = False
ChDir (strPath)
ActiveWorkbook.SaveAs Filename:=strPath & "Prisdata.xls"
ActiveWorkbook.Close
Application.DisplayAlerts = True
Set wksTemp = Nothing
Set wkscopy = Nothing
strPath = myPath & "\Giro\"
ChDir (strPath)
Dim oAppWd As Word.Application
Set oAppWd = New Word.Application
oAppWd.Visible = True
oAppWd.Documents.Open Filename:=strPath & "Prisstigning.docx"
oAppWd.ActiveDocument.MailMerge.OpenDataSource Name:=(strPath & "Prisdata.xls")
Set oAppWd = Nothing
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
---
Har forsøgt med at indsætte "Application.PathSeperator" de steder, hvor der er en "/", men det hjalp ikke :(
På forhånd tak!
