473,386 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

run time erro 1004 and 13

I have a simple code based on an if statement depending on cell value range. I am making a form that is routed if this particular cell is that is equal to 0 "O18" that no is blanks. Basically the value is based on countif validating other cells are filled out on a form. If the they are all filled out, the countif cell will = to 0 and the form will route to it's destination.

'Macro Created 07/1/2004
'Scroll up to beginning of sheet
ActiveWindow.LargeScroll Up:=5
Range("A1").Select
Dim intResponse As Integer

MsgBox ("Your Document will be sent to the Appropriate Department. A Copy of This form is in your Sent Items Mailbox.")

'Cell must = 0 to send to address
If Range("018") = 0 Then "This is where the error stops"

'Validate crticial information
ActiveWorkbook.HasRoutingSlip = True
With ActiveWorkbook.RoutingSlip
.Recipients = "em***@anonymous.com"
.Subject = "Adverse Event.xlt"
.Message = "Adverse Event.xlt"
.Delivery = xlAllAtOnce
.ReturnWhenDone = False
.TrackStatus = True

Range("e5,j5,e6,d11,j9,j11,d28,I28,d29,d30,i29,k29 ,i44,I30,e44,e45").Select
Selection.Interior
Selection.ColorIndex = vbWhite
Selection.Pattern = xlSolid

End With
ActiveWorkbook.Route
ActiveWorkbook.Close SaveChanges:=False
Else

MsgBox "You must fill out all critical information highlighted in RED before Sending", vbCritical, "Critical"
Range("e5,j5,e6,d11,j9,j11,d28,I28,d29,d30,i29,k29 ,i44,I30,e44,e45").Interior.ColorIndex = vbRed
Selection.Pattern = xlSolid

End

End If

End Sub
Jul 21 '05 #1
0 1237

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: dailem | last post by:
I have a bit of code tied to a command button in Access that runs a query then transfers it to a new Excel worksheet (& new file). It works fine EVERY OTHER TIME THAT I RUN IT....what the 'heck...
4
by: Ruy Castelli | last post by:
I created a ASP.NET page using C# and I'm using two components to access a MS-Access database, which are: - oleDbConnection - oleDataAdapter The MS-Access database is in the correct...
0
by: Chen Houwu | last post by:
I use vc6.0,something wrong when i use GDI+ : in StdAfx.h I add the following code betwen #endif//AFX_NO_AFXCMN_SUPPORT and //{{AFX+_INSERT_LOCATION}} code as following: #include "Gdiplus.h"
9
by: Adrian Dragomirescu | last post by:
Hello, I have the following problem: In my ASPX page is a button called "Import". The action of this button is to import a set of data in my database. I have to import big datasets and this...
1
by: Ruy Castelli | last post by:
I created a ASP.NET page using C# and I'm using two components to access a MS-Access database, which are: - oleDbConnection - oleDataAdapter The MS-Access database is in the correct directory...
1
by: tarcisio | last post by:
Pessoal, qdo eu mando rodar a pagina o VS 2003 aparece o seguinte erro: Erro While trying to run project : Unable to start debbuging web server. Debbuging failed because integred Windows...
3
by: Maverick | last post by:
I'm new to this, but I have received so much great information here, I had to join. Here is a problem am encountering with the following code in MS Access: objSht.Activate ...
0
by: Jono | last post by:
Hello, I've been getting this message when closing excel (not necessarily when closing the workbook by itself, but when closing Excel and the workbook at the same time): ...
2
by: Erik Lautier | last post by:
I've got Page_Error emailing me the message and stack trace when a server error is generated, but it doesn't always work. My Page_Error code: Sub Page_Error(ByVal src As Object, ByVal args As...
0
by: grego9 | last post by:
When I run the following macro in Excel (using VBA) I get the run time error 1004 application defined or object defined error. I get the usual debug message and when I click end I actually get the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.