我想在一个标签中写上信箱,点击出来OE
怎么样调用outlook,并且是自己的信箱?
另外,今天用MSHFGrid与ADO结合的时候,老提示"对象变量或with块变量未设置",怎么搞的?dim conn as ...
dim rs as ...
set conn =...
conn.open...
set rs ...
rs.select *...
set MSHFGrid1.datasource = rs
提示"对象变量或with块变量未设置"

解决方案 »

  1.   

    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 Sub Form_Load()
    Dim hy
    hy = ShellExecute(0&, vbNullString, "mailto:[email protected]", vbNullString, vbNullString, vbNormalFocus)
    End Sub
      

  2.   

    rs.select 
    ----------------
    试试 rs.open "select...", conn, adOpenStatic, adLockOptimistic
      

  3.   

    工程--->引用--->Microsoft ActiveX Data Object 2.x(版本号)    Dim CN   As New ADODB.Connection                '定义数据库的连接
        Dim Rs   As New ADODB.Recordset    CN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\NWIND.MDB;Persist Security Info=False"
        CN.Open    Rs.CursorLocation = adUseClient
        Rs.Open "select * from employees", CN, adOpenDynamic, adLockBatchOptimistic 
        Set MSHFlexGrid1.DataSource = Rs
      

  4.   

    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 LongPrivate Sub Command1_Click()
        ShellExecute Me.hwnd, vbNullString, "mailto:[email protected]", vbNullString, "", SW_SHOWNORMALEnd Sub