473,386 Members | 1,823 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.

Object Error

I am working in Excel 2010 and am trying to print a report from another tab only if a specific cell is within a specific range. When I click the 'Print' button I get "Run-time error '424': Object required" when it gets to my LOW and HIGH strings. I do not know how to fix this. Any clues would be appreciated.

Expand|Select|Wrap|Line Numbers
  1. Sub PRINT_SLURRY_Click()
  2.  
  3.     'Prints batch ticket from different tab
  4.     Dim LOW As String
  5.     Dim HIGH As String
  6.  
  7.     LOW = Application.WorksheetFunction.VLookup(Range("C7"), Sheet.TANKS.Range("A:D"), 3, False)
  8.     HIGH = Application.WorksheetFunction.VLookup(Range("C7"), Sheet.TANKS.Range("A:D"), 4, False)
  9.  
  10.     If Range("C10") < LOW Or Range("C10") > HIGH Then
  11.         MsgBox "Batch Size is not within range!"
  12.     Else
  13.         Sheets("BATCH TICKET").Select
  14.         Application.Dialogs(xlDialogPrintPreview).Show
  15.     End If
  16.  
  17.     'Clears contents in form
  18.     Worksheets("FORM").Range("C7:C8").ClearContents
  19.     Worksheets("FORM").Range("C10").ClearContents
  20.  
  21.     'Sets focus back to MAIN SCREEN tab
  22.     Sheets("MAIN SCREEN").Select
  23.  
  24. End Sub
  25.  
Nov 6 '14 #1
1 2331
I figured it out. I changed...
Expand|Select|Wrap|Line Numbers
  1. LOW = Application.WorksheetFunction.VLookup(Range("C7"), Sheet.TANKS.Range("A:D"), 3, False)
  2.  8.     HIGH = Application.WorksheetFunction.VLookup(Range("C7"), Sheet.TANKS.Range("A:D"), 4, False)
  3.  
to...
Expand|Select|Wrap|Line Numbers
  1.     LOW = Application.WorksheetFunction.VLookup(Sheets("FORM").Range("C7"), Sheets("TANKS").Range("A:D"), 3, False)
  2.     HIGH = Application.WorksheetFunction.VLookup(Sheets("FORM").Range("C7"), Sheets("TANKS").Range("A:D"), 4, False)
  3.  
Nov 6 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Williams | last post by:
I registered aspsmartupload.dll and put aspsmartuploadutil.dll into c:\WINNT\system32 folder and I'm getting the following error. Here is the line of code refered to ing the error message: Set...
2
by: Patrick Olurotimi Ige | last post by:
But i get Error:- Could not access 'CDO.Message' object Error I'm trying to send email using this :- Dim objEmail as New MailMessage sBody = "This is our test email to you"...
1
by: Kurt Van Campenhout | last post by:
Hi, I am trying to get/set Terminal server information in the active directory on a windows 2000 domain. Since the ADSI calls for TS don't work until W2K3, I need to do it myself. I'm fairly...
9
by: bill | last post by:
I keep getting Object reference not set to an instance of an object error when trying to run my application on an installed client machine. I installed it on several others and it runs fine. I...
4
by: Hansen | last post by:
Hi! I have a try/catch statement on my webpage, in which a create som html. Sometimes this routine fails and the catch writes the error in an alert box. My problem is that the only thing the...
2
by: dotnetnoob | last post by:
i got this program that will fetch the data in the excel spreadsheet, it was working before then i make some adjustment and it now give me an error of "Object reference not set to an instance of an...
2
by: Thefire | last post by:
Hello All i am using Bisness object Crystal Report XI version and installed it on my server. I have checked to installed as server. I am using the following code to connect and display the Report...
1
by: john garvey | last post by:
Hi I've been getting this error for the last few days on my Windows 7 machine with IIS7 which is running a small web site written in classic ASP. Server object error 'ASP 0178 : 80070005' ...
0
by: Art Altman | last post by:
I have found a workaround to the Excel VBA “ run time error 40036 application-defined or object error”. It does not fix the original problem, which is in excel, SOMEWHERE. A few responses I...
2
by: user65 | last post by:
Windows 2008 / IIS 7 Running ASP CMS website using MSSQL. I am getting the following error when attempting to save a large entry: Request object error 'ASP 0104 : 80004005' Operation not...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.