sparky2205
Well-known Member
- Joined
- Feb 6, 2013
- Messages
- 507
- Office Version
- 365
- 2016
- Platform
- Windows
Hi folks,
I'm trying to allow the users select a worksheet name by using the mouse to click on the worksheet tab.
If I use...
...I get "Excel found a problem with one or more formula references in this worksheet" because the worksheet name in the Inputbox is "='Final Inspection Summary'!". I presume the "=" is causing the problem.
I can get the name using...
But this requires that the user click on the worksheet tab and then click on a cell within the worksheet.
Is there any way to get the worksheet name just by clicking on the tab i.e. name?
It's not that the extra click would be so onerous on the user. But I would anticipate a lot of "This doesn't work" comments by users just clicking on the tab.
I'm trying to allow the users select a worksheet name by using the mouse to click on the worksheet tab.
If I use...
Code:
Dim sName as String
sName = Application.InputBox("Enter the Sheet Name", Type:=2)
...I get "Excel found a problem with one or more formula references in this worksheet" because the worksheet name in the Inputbox is "='Final Inspection Summary'!". I presume the "=" is causing the problem.
I can get the name using...
Code:
Dim sheet as Worksheet
Set sheet = Application.InputBox("Enter the Sheet Name", Type:=8).Parent
But this requires that the user click on the worksheet tab and then click on a cell within the worksheet.
Is there any way to get the worksheet name just by clicking on the tab i.e. name?
It's not that the extra click would be so onerous on the user. But I would anticipate a lot of "This doesn't work" comments by users just clicking on the tab.