我想用VBA从用户那里获取输入的文件制作一个 excel 1,2或者3:
打开文件时如何运行它
xslm?假设我的文件中有这张表:

这common data对于列A B和C独特的内容很有用。我想使用下面的代码,所以取决于用户输入,它会从A或B到唯一数据C 的地方选择A's唯一数据。但我希望A 列的数据可重复使用以供将来使用,例如,如果用户将提供input_num=1,那么数据将是A's unique data
Sub main()
MsgBox ("welcome")
Dim input_num As Integer
input_num = InputBox(Prompt:="please select device", Title:="select device", Default:=3)
If input_num = 1 Then
' use the first column
ElseIf input_num = 2 Then
' use the second column
Else
' use the third column
End If
End Sub
