- Katılım
- 25 Aralık 2007
- Mesajlar
- 335
- Excel Vers. ve Dili
- exel 2000 türkçe
Private baglan As Object, rs As Object
Sub baglanti()
Set baglan = CreateObject("adodb.connection")
baglan.Open "provider=microsoft.jet.oledb.4.0;data source=" & ThisWorkbook.Path & "\sirket.mdb"
End Sub
Private Sub listeye_al()
ListBox1.Clear
Set baglan = CreateObject("adodb.connection")
Set rs = CreateObject("adodb.recordset")
Call baglanti
rs.Open "select * from [sirket]", baglan, 1, 1
With ListBox1
.RowSource = Empty
.ColumnCount = 2
.ColumnWidths = "00;80"
.Column = rs.getrows
End With
rs.Close
Set rs = Nothing
End Sub
yukardaki kodla bir acces doyasına baglanıyorum
bu form bir baska formun uzerine acılmakta ve bu formu baslıksız yapmak icin
yukardaki kodların altına
Option Explicit
Dim p As Integer
Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "user32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "user32" _
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Sub UserForm_activate()
On Error Resume Next
Dim hWnd As Long, exLong As Long
hWnd = FindWindowA(vbNullString, Me.Caption)
exLong = GetWindowLongA(hWnd, -16)
If exLong And &H880000 Then
SetWindowLongA hWnd, -16, exLong And &HFF77FFFF
Me.Hide: Me.Show
End If
End Sub
kodunu yazıyorum ancak hata veriyor
2 kodda tek tek calısıyor ama 2 si bi arada calısmıyor ne yapmam gerekli
Sub baglanti()
Set baglan = CreateObject("adodb.connection")
baglan.Open "provider=microsoft.jet.oledb.4.0;data source=" & ThisWorkbook.Path & "\sirket.mdb"
End Sub
Private Sub listeye_al()
ListBox1.Clear
Set baglan = CreateObject("adodb.connection")
Set rs = CreateObject("adodb.recordset")
Call baglanti
rs.Open "select * from [sirket]", baglan, 1, 1
With ListBox1
.RowSource = Empty
.ColumnCount = 2
.ColumnWidths = "00;80"
.Column = rs.getrows
End With
rs.Close
Set rs = Nothing
End Sub
yukardaki kodla bir acces doyasına baglanıyorum
bu form bir baska formun uzerine acılmakta ve bu formu baslıksız yapmak icin
yukardaki kodların altına
Option Explicit
Dim p As Integer
Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "user32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "user32" _
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Sub UserForm_activate()
On Error Resume Next
Dim hWnd As Long, exLong As Long
hWnd = FindWindowA(vbNullString, Me.Caption)
exLong = GetWindowLongA(hWnd, -16)
If exLong And &H880000 Then
SetWindowLongA hWnd, -16, exLong And &HFF77FFFF
Me.Hide: Me.Show
End If
End Sub
kodunu yazıyorum ancak hata veriyor
2 kodda tek tek calısıyor ama 2 si bi arada calısmıyor ne yapmam gerekli
