[belajar-excel] error VBA ketika menggunakan Excel 64 Bit

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[belajar-excel] error VBA ketika menggunakan Excel 64 Bit

him mah
Assalamu'alaikum Wr. Wb.
selamat pagi temen-temen excel semua

saya ada masalah terkait menjalankan VBA di excel 64Bit, yang sebelumnya
bisa berjalan normal di excel 32Bit

VBA nya seperti dibawah
kenapa tetap error ya (yang berwarna merah)
kira kira yang salah atau yang kurang apa ya

#If VBA7 Then
    Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" ( _
        ByVal hWnd As LongPtr, ByVal lpOperation As String, ByVal lpFile As
String, _
        ByVal lpParameters As String, ByVal lpDirectory As String, ByVal
nShowCmd As Long) As LongPtr
#Else
    Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" ( _
        ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As
String, _
        ByVal lpParameters As String, ByVal lpDirectory As String, ByVal
nShowCmd As Long) As Long
#End If


ini versi excel

[image: excel_versi.JPG]

ini error nya

[image: error-bit64.JPG]

excel_versi.JPG (21K) Download Attachment
error-bit64.JPG (84K) Download Attachment
Kid
Reply | Threaded
Open this post in threaded view
|

Re: [belajar-excel] error VBA ketika menggunakan Excel 64 Bit

Kid
Administrator
Wa'alaikumussalam wr wb
Warna merah itu gak error, sekadar peringatan saja.
Sebaiknya susunannya begini :

#if vba7 then
     fungsi api 64bit pertama
     fungsi api 64bit kedua
     dst
#else
     fungsi api 32bit pertama
     fungsi api 32bit kedua
     dst
#endif


On Wed, Mar 11, 2020 at 7:02 AM him mah [hidden email]
[belajar-excel] <[hidden email]> wrote:

>
>
> Assalamu'alaikum Wr. Wb.
> selamat pagi temen-temen excel semua
>
> saya ada masalah terkait menjalankan VBA di excel 64Bit, yang sebelumnya
> bisa berjalan normal di excel 32Bit
>
> VBA nya seperti dibawah
> kenapa tetap error ya (yang berwarna merah)
> kira kira yang salah atau yang kurang apa ya
>
> #If VBA7 Then
>     Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias
> "ShellExecuteA" ( _
>         ByVal hWnd As LongPtr, ByVal lpOperation As String, ByVal lpFile
> As String, _
>         ByVal lpParameters As String, ByVal lpDirectory As String, ByVal
> nShowCmd As Long) As LongPtr
> #Else
>     Private Declare Function ShellExecute Lib "shell32.dll" Alias
> "ShellExecuteA" ( _
>         ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As
> String, _
>         ByVal lpParameters As String, ByVal lpDirectory As String, ByVal
> nShowCmd As Long) As Long
> #End If
>
>
> ini versi excel
>
> [image: excel_versi.JPG]
>
> ini error nya
>
> [image: error-bit64.JPG]
>
>
>

excel_versi.JPG (21K) Download Attachment
error-bit64.JPG (84K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [belajar-excel] error VBA ketika menggunakan Excel 64 Bit

him mah
oh begitu ya, kirain merah itu error. terima kasih banyak pak

Pada tanggal Sen, 16 Mar 2020 pukul 08.16 'Mr. Kid' [hidden email]
[belajar-excel] <[hidden email]> menulis:

>
>
> Wa'alaikumussalam wr wb
> Warna merah itu gak error, sekadar peringatan saja.
> Sebaiknya susunannya begini :
>
> #if vba7 then
>      fungsi api 64bit pertama
>      fungsi api 64bit kedua
>      dst
> #else
>      fungsi api 32bit pertama
>      fungsi api 32bit kedua
>      dst
> #endif
>
>
> On Wed, Mar 11, 2020 at 7:02 AM him mah [hidden email]
> [belajar-excel] <[hidden email]> wrote:
>
>>
>>
>> Assalamu'alaikum Wr. Wb.
>> selamat pagi temen-temen excel semua
>>
>> saya ada masalah terkait menjalankan VBA di excel 64Bit, yang sebelumnya
>> bisa berjalan normal di excel 32Bit
>>
>> VBA nya seperti dibawah
>> kenapa tetap error ya (yang berwarna merah)
>> kira kira yang salah atau yang kurang apa ya
>>
>> #If VBA7 Then
>>     Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias
>> "ShellExecuteA" ( _
>>         ByVal hWnd As LongPtr, ByVal lpOperation As String, ByVal lpFile
>> As String, _
>>         ByVal lpParameters As String, ByVal lpDirectory As String, ByVal
>> nShowCmd As Long) As LongPtr
>> #Else
>>     Private Declare Function ShellExecute Lib "shell32.dll" Alias
>> "ShellExecuteA" ( _
>>         ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As
>> String, _
>>         ByVal lpParameters As String, ByVal lpDirectory As String, ByVal
>> nShowCmd As Long) As Long
>> #End If
>>
>>
>> ini versi excel
>>
>> [image: excel_versi.JPG]
>>
>> ini error nya
>>
>> [image: error-bit64.JPG]
>>
>>
>

excel_versi.JPG (21K) Download Attachment
error-bit64.JPG (84K) Download Attachment