Clever-Excel-Forum

Normale Version: Microsoft Visual Basic
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Seiten: 1 2
Guten Abend....
erstmal super das ich euch gefunden habe, da ich viel mit excel mache, Meiner verständnis bezüglich Excel ist nicht gering.... nun habe ich aber einen Sheet bekommen und da habe ich definitiv 0 Ahnung von.

diese sheet ist für einen Browser-Spiel (GPRO) und sollte mir die Möglichkeit geben meiner Daten vom Spiel in meiner Excel zu transferieren..... nun gibt diese aber einen Fehler an

[attachment=26375]
 
ich habe hiervon keine blassen schimmer, soweit ich hiermit verstanden habe ist dass der Code nur mit 32 bit funktioniert aber gibt es ein möglichkeit diese zu ändern.

jegliche hilfe würde ich begrüßen.

P.S. sollte schon ein Thema existieren mit der gleiche Frage dann verzeih mir bitte
Hallo

Die Fehlermeldung sagt doch was fehlt im Code "PtrSafe".
Dann zeige doch mal dein Code.
(07.09.2019, 21:41)Ivan 16 schrieb: [ -> ]Hallo

Die Fehlermeldung sagt doch was fehlt im Code "PtrSafe".
Dann zeige doch mal dein Code.

dann muss ich dir schon die komplette sheet zeigen, weil wie gesagt habe ich diese von jemande bekommen und dies übersteigt meiner kenntniss bezüglich Excell um das vielfaches



mit diesen Person sollte/wollte ich ein Team vormen nur leider ist der letzte Woche verstorben und er war der einzige der mir bekannt war und bescheid wusste
Hallöchen,

wenn es nur um ein Spiel geht ist es sicher kein Problem, die Datei hier hochzuladen - bitte auch den "roten" Hinweis beachten. Ansonsten Datenschutz beachten.
hab mal den sheet hinzugefügt hoffentlich könnt ihr mir da helfen
Hallo 


Meinst du so??
ok ich bekomme keinen Fehlermeldung mehr und er scheint zu Daten zu laden....

jetzt bin ich neugierig wie und was du gemacht hast ......
och menno, jetzt kommt doch ein fehler

Zitat: While ObjIE.Busy
            Wend
            While ObjIE.document.ReadyState < 4
            Wend
            newHour = Hour(Now())
            newMinute = Minute(Now())
            newSecond = Second(Now()) + 2
            waitTime = TimeSerial(newHour, newMinute, newSecond)
            Application.Wait waitTime

            x = ""
            x = ObjFF.document.body.innerHTML
            
            
            
            Cells(RowCount, SourceBody) = x
        End If
        If (Left(Cells(RowCount, DescriptionColumn), 9) = "Practice " And Val(Right(Cells(RowCount, DescriptionColumn), 1)) <= Cells(84, ResultCol)) Or Left(Cells(RowCount, DescriptionColumn), 9) <> "Practice " Then
        If Cells(RowCount, Search2) = "Wings:<" And Val(Mid(Cells(RowCount, DescriptionColumn), InStr(Cells(RowCount, DescriptionColumn), " ") + 1, 1)) <= Cells(84, ResultCol) Then
       


Fettmarkierte ist gelb unterlegt, so denke ich mal das hier ein Fehler ist, nur welche
Hallo

Ich habe gerade nochmals deine Datei im Win 10 64 Bit  und Office 2019 64 Bit System laufen lassen, habe alle deine Makros ausgeführt, bei mir kommt keine Fehlermeldung.
Mehr kann ich leider nicht sagen, keine Ahnung was du anders machst.

Geändert bzw. hinzugefügt habe ich nur hier das PtrSafe, sonst nichts.

Private Declare PtrSafe Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare PtrSafe Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare PtrSafe Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long

Private Declare PtrSafe Function GetForegroundWindow Lib "user32" () As Long
Private Declare PtrSafe Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, ByRef lpdwProcessId As Long) As Long
Private Declare PtrSafe Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Hallo,

was ObjFF.document.body.innerHTML betrifft, ist ObjFF nicht korrekt sondern müsste ObjIE heißen, da die Variable auch so heißt.
Ist in Deiner Datei, die Du hier zur Verfügung gestellt hast, auch so.

Was den Windows-API Code betrifft, so ist es nicht ausreichend, nur PtrSafe hinzuzufügen, auch wenn es unter z.B. Excel 2010
dann oft funktioniert, also nur PtrSafe. Die korrekten Deklarationen sind:


Code:
  Private Declare PtrSafe Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As LongPtr
  Private Declare PtrSafe Function GetForegroundWindow Lib "user32" () As LongPtr
  Private Declare PtrSafe Function SetForegroundWindow Lib "user32" (ByVal hwnd As LongPtr) As Long
  Private Declare PtrSafe Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As LongPtr, lpdwProcessId As Long) As Long
  
#If Win64 Then
  
  Private Declare PtrSafe Function GetWindowLong Lib "user32" Alias "GetWindowLongPtrA" (ByVal hwnd As LongPtr, ByVal nIndex As Long) As LongPtr
  Private Declare PtrSafe Function SetWindowLong Lib "user32" Alias "SetWindowLongPtrA" (ByVal hwnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As LongPtr) As LongPtr

#Else
  
  Private Declare PtrSafe Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As LongPtr, ByVal nIndex As Long) As LongPtr
  Private Declare PtrSafe Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As LongPtr) As LongPtr
  
#End If

Gruß
Seiten: 1 2