返回列表 上一主題 發帖

[發問] 此處需要物件

[發問] 此處需要物件

此處需要物件.rar (16.62 KB)

按下按鈕→可使用
使用聚集→跳窗→訊息 : 此處需要物件

目前網路努力尋找中。

With TextBox1 改為  With ActiveSheet.OLEObjects("TextBox1")

TOP

本帖最後由 av8d 於 2011-7-19 14:35 編輯

回復 2# oobird


    真的非常感謝版大的熱心回應,解開了我的難題。
   
    指定完成
    Private Sub Workbook_Open()
    Application.OnKey "^q", "工作表1.CommandButton1_Click"
    End Sub
    以下使用正確無誤,但是方便性欠佳,因此我想修。
    Private Sub CommandButton1_Click()
    Cells(2, ActiveCell.Column + 1).Select
    Dim t
        With TextBox1
            If Not .Visible Then
                t = 1 '或InputBox("輸入限制字元數", "WLZ", 3)
                If IsNumeric(t) Then LenStr = t
                If t < 1 Then t = 1
                .Activate
            End If
            .Visible = CommandButton1
        End With
    End Sub
    方便性欠佳.rar (13.88 KB)
    使用方法,點A1然後執行Private Sub CommandButton1_Click()
    即可快速地填上數字,且會自動換行,方便性欠佳的部分就是,每次執行前都要按ESC,
    所以我想將Call Form_KeyDown(27, 0)加入Private Sub CommandButton1_Click()
    可是一放進去就會顯示錯誤,不知道還有沒有其他的方法使其更便利,我將持續上網搜尋中。

TOP

        靜思自在 : 【為善競爭】人生要為善競爭,分秒必爭。
返回列表 上一主題