Adding text to a cell in Excel using VBA

前端 未结 4 662
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-11 11:31

I\'ve been working with SQL and Excel Macros, but I don\'t know how to add text to a cell.

I wish to add the text \"01/01/13 00:00\" to cell A1

4条回答
  •  天涯浪人
    2021-01-11 12:15

    You can also use the cell property.

    Cells(1, 1).Value = "Hey, what's up?"
    

    Make sure to use a . before Cells(1,1).Value as in .Cells(1,1).Value, if you are using it within With function. If you are selecting some sheet.

提交回复
热议问题