【发布时间】:2017-02-08 22:11:45
【问题描述】:
我必须通过 InputBox 函数在所选单元格中输入结果:
Set OutputStrt = Application.InputBox("Select a cell, where the output should be dropped.", "Output start cell", Type:=8)
当我在不同的工作表中运行代码并希望在不同的工作表中得到结果时,它会将结果放到我最初运行代码的工作表中。
如何获取通过 Application.InputBox 选择的 Worksheet 名称?
例如,当我在输入框中选择:Definitions!$F$38 时,我如何获得名称“Definitions”?
【问题讨论】:
-
OutputStrt.Parent.Name
标签: excel worksheet inputbox vba