cavanoos
Altın Üye
- Katılım
- 17 Aralık 2008
- Mesajlar
- 781
- Excel Vers. ve Dili
- Microsoft 365
Arkadaşlar;
Nette gezinirken alttaki gibi bir kod buldum.Çalıştırdığımda filename kısmında hata alıyorum.Bir bakabilir misiniz,hatayı nerde yapıyorum.
Option Explicit
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
Private Const SW_HIDE As Long = 0
Private Const SW_SHOWNORMAL As Long = 1
Private Const SW_SHOWMAXIMIZED As Long = 3
Private Const SW_SHOWMINIMIZED As Long = 2
Sub Yazdir()
ShellExecute Application.hwnd, "print", filename, vbNullString, "C:\", SW_SHOWNORMAL
End Sub
Nette gezinirken alttaki gibi bir kod buldum.Çalıştırdığımda filename kısmında hata alıyorum.Bir bakabilir misiniz,hatayı nerde yapıyorum.
Option Explicit
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
Private Const SW_HIDE As Long = 0
Private Const SW_SHOWNORMAL As Long = 1
Private Const SW_SHOWMAXIMIZED As Long = 3
Private Const SW_SHOWMINIMIZED As Long = 2
Sub Yazdir()
ShellExecute Application.hwnd, "print", filename, vbNullString, "C:\", SW_SHOWNORMAL
End Sub
