請問1.如何設定日期:(同儲存格式 日期 但使用vba)只輸入12/16 自動顯示為 2015/12/16只輸入12(月份) 顯示為 2015/12如輸入完整年月份則顯示 ex.2016/01/012.如何設定加:(同儲存格 = 的功能)ex.輸入300+500 顯示為800
Private Sub CommandButton1_Click()With ActiveSheetif len(textbox1.value)>5 then.range("B1")=textbox1.valueelse.Range("B1") = Year(Date) & "/" & TextBox1.Valueend if.Range("B2") = "=" & TextBox2.ValueEnd WithEnd Sub試試看