View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Delete Function:

Try:

Set cell = Application.Inputbox("Select cell using mouse", Type:=8)

In article .com,
"Ardy" wrote:

Bob:
Got an error on
cell = Application.Inputbox("Select cell using mouse2, Type:=8)
and
Worksheets(cell.Resize(1,10.Value).delete

I wonder why, I got to play with this and see how I can make it work
Ardy
Bob Phillips wrote:
Dim cell as range

cell = Application.Inputbox("Select cell using mouse2, Type:=8)

On Error Resume Next
Application.Displayalerts = False
Worksheets(cell.Resize(1,10.Value).delete
Application.Displayalerts = True
On Error Goto 0

cell.ClearContents

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Ardy" wrote in message
ups.com...
I am trying to create a macro that will delete a cell content and
related tab by picking the cell. i.e. We have bunch of names in column
A starting at A2 in tab "Roster". Each name in "Roster" has
its own respected Tab. The macro or Code once activated will have the
user to pick the cell that has the name to be deleted, clears the
content, but before clearing will capture the name in a variable that
will be used to find the respected tab and delete the tab as well.
Any help on this is appreciated.

Ardy