<strong id="nr4sf"></strong>

<button id="nr4sf"><object id="nr4sf"></object></button>

    <rp id="nr4sf"></rp>
    <th id="nr4sf"><track id="nr4sf"></track></th>
      <s id="nr4sf"></s>
    1. <em id="nr4sf"></em>
    2. <li id="nr4sf"><acronym id="nr4sf"></acronym></li>
    3. <button id="nr4sf"></button>

      office交流網--QQ交流群號

      Access培訓群:792054000         Excel免費交流群群:686050929          Outlook交流群:221378704    

      Word交流群:218156588             PPT交流群:324131555

      Access中向Excel單元格中錄入數據

      2020-11-17 08:00:00
      tmtony8
      原創
      7114

      access常常需要和Excel表格交互數據。比如把access窗口中的文本寫入到Excel單元格中

      如圖所示,向單元格“B3”中輸入內容“office交流網”,點擊輸入到Excel表格中


      詳細代碼如下:主要是通過創建Excel對象,把指定內容錄入到指定的單元格中


          Dim xlApp As Object
          Dim xlWbk As Excel.Workbook
          Dim xlWsh As Excel.Worksheet
         
          
          Set xlApp = GetObject(, "Excel.Application")
          xlApp.Visible = True
          Set xlWbk = xlApp.Workbooks.Open(CurrentProject.Path & "\示例1.xlsx")
          Set xlWsh = xlWbk.Worksheets(1)
          xlWsh.Activate
         
          xlWsh.Range(txtRange).Value = Me.txt1 ' 
          
          xlWbk.Save '保存
          Set xlWsh = Nothing
          Set xlWbk = Nothing
          Set xlApp = Nothing



      效果如圖所示

        分享
        一级日本牲交大片束缚_玖玖资源站亚洲最大的网站_56PAO国产成视频永久_97人人操人人摸
        <strong id="nr4sf"></strong>

        <button id="nr4sf"><object id="nr4sf"></object></button>

        <rp id="nr4sf"></rp>
        <th id="nr4sf"><track id="nr4sf"></track></th>
          <s id="nr4sf"></s>
        1. <em id="nr4sf"></em>
        2. <li id="nr4sf"><acronym id="nr4sf"></acronym></li>
        3. <button id="nr4sf"></button>