Suppress Error 1004?

EssKayKay

Board Regular
Joined
Jan 5, 2003
Messages
233
Office Version
  1. 2007
Platform
  1. Windows
First, I must state I am by no means a programmer, so bear with me if you please.

I’m not sure this is possible but is there a way suppress an error message? I know why this is happening but I can’t find where or how to revise my code. Any suggestions would be appreciated.
1705435020154.png

Thanks,
Steve K.
 
Best approach is to not raise the error in the first place and to have any idea as to how to do that would require seeing more code and understanding what causes it. Using the handling approach, imagine this:

VBA Code:
On Error GoTo errHandler
Set rng = something <<this causes an error so go to errHandler
With rng
   do this and that
End With

errHandler:
if error is 1004 (it is), Then
   ignore it and resume next
End If

That would resume next at With rng block. Now that rng was not set, another error is raised because the object variable has not been set, so With will fail, so cascading errors. Maybe the next error is 1004 again, who knows. Around and around we go. If you're going to say you don't have a With block it doesn't matter. I only use that as an example of what can happen with that approach: real buggy code.
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Thank you both very much for your responses. I will look at this and get back to you. However, this may take some time.

Thanks again - I will return,
Steve K.
 
Upvote 0
I have been playing with this but still no luck. What I'd like to do is post or forward a copy of my worksheet for you and others to review. However, I'm not sure if this is even allowed on MrExcel. Is there some way for me to do this? I've reduced the file to <1MB if that matters.

If so, I would write out and explain exactly what's happening. You could then see what I am talking about (a pictures worth a thousand words). Now, please realize in no manner do I expect anyone to spend a lot of time reviewing my extremely messy code but possibly a quick glance by you Gurus could see some glaring mistake.

Just asking & again - thanks,
Steve
 
Upvote 0
If you remove any/all sensitive data, upload your file to a file sharing site (OneDrive, DropBox, etc), and then provide a link to it here, someone may be willing to download it and try to analyze it for you.
 
Upvote 0
If you remove any/all sensitive data, upload your file to a file sharing site (OneDrive, DropBox, etc), and then provide a link to it here, someone may be willing to download it and try to analyze it for you.
Good idea Joe - thanks. I think I did that once before (DropBox). I tell you, this old guy just can't keep up.
 
Upvote 0
I really think it will turn out that the answer lies in post 2 or 6.
 
Upvote 0
Hello, I’m back,

I was unable to resolve my Error 1004 issue.

Not sure anyone is interested but if you wish to assist me I have uploaded a “sample” of my worksheet called Amortize Test to DropBox.
Here’s the link to the file –
Amortize Test.xls

If you wish to review my program, that would be appreciated; however, I surely do not expect that - especially because as I have noted, I am not a programmer. I have worked on the project periodically over the last year or more.

If you do decide to take a look please do not be “shocked” at how sloppy, ridiculous, and erroneous the coding is. Since I am totally oblivious to proper procedure, when I run into an issue, rather than fixing the original code (since I don’t know how to do that), I simply try to write something else that fixes the problem.

As an example of what I have been trying to avoid the following process will trigger the 1004 error.
1. Click the Paym’t Made button (upper right corner)
2. My Important Message will appear stating the Error 1004 may appear – OK
3. The active cell should now be the next available entry date for when the payment was received.
4. Enter a date and all should go fine.
5. Click the Home button (upper right corner).

Now let’s try to trigger the 1004 error. . .
6. Proceed with steps 1-3 above
7. However, this time as a test, do not enter a date in the next available slot but rather click some other cell in column M below the next available payment date. This should trigger a warning message stating “Do not skip a payment”.
8. Click OK and it should return you to the next available payment date.
9. Enter a date and the 1004 error will appear.
10. Click OK and you can proceed without a problem.

Another way to trigger the 1004 error. . .
11. Proceed with steps 1-3 above
12. Click on any of the previously entered payment received dates in column M
13. The 1004 error will appear.


Thank you for viewing,
Steve K.
 
Upvote 0
The site seems to require that I create an account and I'm not going to do that. However, I will pm you an email address that I seldom use (assuming I can do that). If you want to send the file that way I will take a look but won't promise anything.
 
Upvote 0
This in Google sheets, not Excel ??
Thanks for your suggestion Michael. I must note, I know nothing about XL2BB but from what I've read, apparently it converts my code to something else. The code is many pages long so I'm not sure how this would work. To me (an absolute idiot, so please bear with me) why not just let me post the worksheet as is without any mumbo-jumbo - then I know you are seeing what I am seeing? Please explain. I'd like to proceed if this is possible.

Sorry for the question but I'm confused (which is nothing new for this old guy),
Steve K.
 
Upvote 0

Forum statistics

Threads
1,215,295
Messages
6,124,103
Members
449,142
Latest member
championbowler

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top