Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 2593|回复: 4

VBA代码64位操作系统不能用,32位的可以,该怎么修改?

[复制链接]
发表于 2017-6-5 17:31 | 显示全部楼层 |阅读模式
Private Sub CommandButton1_Click()
Call Vdate
Call Clear
Call Actuator
End Sub
Private Sub Actuator()
On Error Resume Next
Dim a
Dim d1, d2
n = 0
r = 0
Do While Sheets("台账表").Cells(r+ 2, 2).Value <> ""
d1 = Sheets("台账表").Cells(r+ 2, 3).Value
d2 = TextBox1.Value
If DateValue(d1) = DateValue(d2) Then
    a= a & Sheets("台账表").Cells(r + 2, 2).Value & "#" & ""
   
End If
r = r + 1
Loop
   Sheets("报审").Range("D5:N5").Value = Left(a, Len(a) - 1)
   
End Sub
Private Sub Clear()
   Sheets("报审").Range("D5:N5").ClearContents
   
End Sub
Private Sub Vdate()
   If Not IsDate(TextBox1.Value) Then
       MsgBox "请输入正确日期格式,如:2017/01/01!"
       End
      
   End If
End Sub

发表于 2017-6-5 17:41 | 显示全部楼层
回复

使用道具 举报

 楼主| 发表于 2017-6-5 17:50 | 显示全部楼层
程序是请别人写的,我复制过来的,在台式机上能运行,但是在笔记本上就是错误的
回复

使用道具 举报

 楼主| 发表于 2017-6-5 18:06 | 显示全部楼层
各位大神谁能帮下忙?急用,在线等
回复

使用道具 举报

发表于 2017-6-5 20:28 | 显示全部楼层
lkb0828 发表于 2017-6-5 18:06
各位大神谁能帮下忙?急用,在线等

你附件吧
这样不知道你错在哪里
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-5-6 14:08 , Processed in 0.636139 second(s), 13 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表