Using FSO to insert folder name into cell based on criteria being met

前端 未结 2 1058
刺人心
刺人心 2021-01-27 08:16

I\'m having trouble putting the syntax together for this and I just started working with FSO in VBA, so please bear with me.

fsofol.name = test1 (this is correct)

2条回答
  •  时光说笑
    2021-01-27 08:56

    Change

     fsoFol.Name.Copy **'error is here and states object required**
     firstRange.Offset(0, 5).PasteSpecial xlPasteValues
    

    to

     firstRange.Offset(0, 5).Value = fsoFol.Name
    

提交回复
热议问题