如何在单元格中进行vba和手动输入 [英] how to make vba and manual entry both in a cell

查看:181
本文介绍了如何在单元格中进行vba和手动输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在vba和manual两个范围内输入值。

I want to enter value in a range with vba and manual both.

说   

Say    

如果范围("B82")。值<> ""然后是范围("B88")。值="调查报告。"   

If Range("B82").Value <> "" Then Range("B88").Value = "investigation report ."   

如果范围("B82")。值=""然后Range("B88")。Value =""

If Range("B82").Value = "" Then Range("B88").Value = ""

这里它在宏运行时清除B88中的值。如果我手动输入值,我希望它不清除但保留值。如果它是空的那么它应该可以工作。

Here it clear value in B88 when macro runs. I want it not to clear but retain value , if I enter value manually . If it is empty then it should work.

有可能吗?请帮忙。

问候

推荐答案

我不确定我是否理解正确。我假设代码是在工作表更改事件中。它是否正确?如果是,那么请发布所有现有代码,然后将各个方案分别列出您想要出现的各种变化和条件
。 
I am not sure that I am understanding correctly. I am assuming that the code is in a Worksheet change Event. Is this correct? If so, then please post all of existing code and then list each of the scenarios separately with what you want to occur with the various changes and conditions. 


这篇关于如何在单元格中进行vba和手动输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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