473,586 Members | 2,863 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.La rgeScroll Up:=5
Range("A1").Sel ect
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***@anonymou s.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,i2 9,k29,i44,I30,e 44,e45").Select
Selection.Inter ior
Selection.Color Index = vbWhite
Selection.Patte rn = xlSolid

End With
ActiveWorkbook. Route
ActiveWorkbook. Close SaveChanges:=Fa lse

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,i2 9,k29,i44,I30,e 44,e45").Interi or.ColorIndex = vbRed
Selection.Patte rn = xlSolid


End If

End Sub
Jul 21 '05 #1
0 1247

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

Similar topics

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 is going on? I get the following error message on the odd runs: Run-Time Error 1004 Method 'Columns' of object '_Global' failed
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, IIS has permission to write. Everything seems ok, but IIS says that it can't open the file because there is someone else using it exclusively...
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"
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 opperation is time consuming (aproximativelly 3-4 hours). After an hour my page display the error: "The page cannot be displayed
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 (IIS has permission to read/write) and everything seems ok, but IIS says that it can't open the file because there is someone else using it...
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 Authentication is not enabled. Onde eu acho a solução para estes erros ? Tarcísio Corte,
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 objSht.Range("A25:H44").Select objSht.Range("A25:H44").Sort Key1:=Range("A25"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1,...
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): -------------------------- Run-time error '1004': Method of 'Worksheets' of object '_Global' failed -------------------------- When I hit Debug, it highlights the...
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 EventArgs) Handles MyBase.Error Dim e As System.Exception = Server.GetLastError() Session("Erro")= "Error: " & e.Message.ToString() & "<p>Stack...
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 result I want from the formula - anyone know how to avoid getting the run time error? thanks! Sub macro10() Dim Workbook As String Dim...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.