Results 1 to 4 of 4

VBA for 64-bit and 32-bit

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-03-2008
    Posts
    387

    VBA for 64-bit and 32-bit

    Hi,

    Below is code that works on 64-bit. I know by switching the LongLong's to Long and removing PtrSafe it works on 32-bit, but I'm wondering how to write this to work on both?

    Option Explicit
    Private mlngStart As LongLong
    Private Declare PtrSafe Function GetTickCount Lib "kernel32" () As LongLong
    
    
    Public Sub StartTimer()
           mlngStart = GetTickCount
    End Sub
    
    Public Function EndTimer() As LongLong
           EndTimer = (GetTickCount - mlngStart)
    End Function
    Last edited by yawnzzzz; 08-02-2010 at 08:55 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1