Go Back   Access World Forums > Apps and Windows > Visual Basic

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 07-05-2017, 03:06 AM   #1
Maclain
Newly Registered User
 
Join Date: Sep 2008
Posts: 91
Thanks: 21
Thanked 0 Times in 0 Posts
Maclain is on a distinguished road
Excel vba script stopping without error on cell value change

Hi everyone,

I have a bit of code that checks a number of fields in an excel sheet before finally saving it and creating a pdf of the file.

I've had to amend the code slightly today in order to cater for a new clients requirements.

However, when running the scripts, it stops after changing a cell value. doesn't throw me an error, just stops.

if I hit the button to run the code again it does not have to change the cell value so continues to complete the process.

if I go into the VBA editor and run the script line by line it works fine including changing the cell value.

the bit that's causing me an issue is this:

Code:
Sub JB_Serial()
Dim seriallength As Integer
seriallength = Range("AU19").Value
    ActiveSheet.Range("B15").Value = "VARIOUS DETAILED BELOW"
    Application.Wait (Now + TimeValue("0:00:2"))
    If seriallength <> "0" Then
    Call serial_check
    Else
    Call CFchck
    End If
End Sub
As you can see I've tried adding in a wait timer to see if the cell update is causing the issue, but am now at a loss.

Thanks for any help!

Maclain is offline   Reply With Quote
Old 07-05-2017, 03:18 AM   #2
Maclain
Newly Registered User
 
Join Date: Sep 2008
Posts: 91
Thanks: 21
Thanked 0 Times in 0 Posts
Maclain is on a distinguished road
Re: Excel vba script stopping without error on cell value change

Nevermind,

I was calling the wrong sub routine after this operation.
Maclain is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question Export to Excel, Change Cell Colour nick1408 General 5 08-01-2016 07:38 AM
Read excel cell value created with MS Access recordset Error 3020 Ritzo Modules & VBA 11 08-28-2012 01:18 AM
Change Text in Cell depending on another cell value Poppa Smurf Excel 2 06-27-2010 04:13 AM
How to create Excel sheet cell by cell accesser2003 General 1 09-05-2007 01:55 PM
Excel / VB update on cell change girobert Modules & VBA 0 06-25-2001 07:44 AM




All times are GMT -8. The time now is 11:32 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World