View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default STILL Having VBA Problems!!!!!!!

Maybe a long-shot, but try this in the loop

Application.VBE.CommandBars.FindControl(ID:=578).E xecute

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Elise148" wrote in message
...
The error comes up before I can enter a name in the Input Box, and before
when it was working, I was entering differnet names - they were no
worksheet
names that were the same. No invalid characters either.

The error lies in the first section of the code I listed below. It's a
1004
error. I looked up information about it, and then I added a save feature
in
the macro. I closed the workbook. Nothing - it still wouldn't work...

"Bob Phillips" wrote:

Are you trying to re-use the same name? Invalid characters in the name?
Where is the error?

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Elise148" wrote in message
...
I posted something on here yesterday, and I got very good responses.
However,
after I implemented each suggestion into VBA the macro worked only
about
10
times. After that it came up with an error that said the worksheet
could
not
be copied...or something like that. This is what my code for that
section
looks like...

This is at the beginning of my macro...what I need to do is copy a
worksheet. That's all I need to do...and it won't work...ANY
SUGGESTIONS???


Sheets("201").Copy After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = InputBox("Enter the number of the new
distributor.")

Thanks,
Elise