Excel - VBA - 公式错误1004 - [英] Excel - VBA - formula error 1004 -

查看:212
本文介绍了Excel - VBA - 公式错误1004 - 的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用以下vba代码时,我遇到运行时错误'1004'应用程序定义或对象定义的错误:

I'm getting an run-time error '1004' application-defined or object-defined error when I'm using the following vba code:

Private Sub CommandButton1_Click()

Dim formul as String

'Run Tercih14

formul = "=vlookup($c$15;'Şube Listesi'!$B:$J;9;FALSE)"


Sheet35.Range("F12").Formula = formul

End Sub

我可以更改 F12 cell.assign 不同的公式,如 = sum(A1:A2)等。如果我创建一个新的工作表,并编辑新的工作表的代码,工作正常 vlookup 公式。
我检查过,工作表没有受到保护。我无法弄清楚这里有什么问题。希望你们可以帮助我找到解决方案。

I can change the value of the F12 cell.assign different formulas like =sum(A1:A2) etc. If I create a new sheet and edit the code for the new sheet it works fine with the vlookup formula. I checked, the sheet is not protected . I'm having trouble figuring out what the problem is here. Hope you guys can help me find the solution.

推荐答案

更改

"=vlookup($c$15;'Şube Listesi'!$B:$J;9;FALSE)"

to

"=vlookup($c$15,'Şube Listesi'!$B:$J,9,FALSE)"

您正在使用;而不是,的

You are using ;'s instead of ,'s

这篇关于Excel - VBA - 公式错误1004 - 的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆