ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Corrupted workbook or code? (https://www.excelbanter.com/excel-programming/301025-corrupted-workbook-code.html)

Martin[_16_]

Corrupted workbook or code?
 
Using win98 and xl2000. I am extracting data from websites.
The code runs once a minute.

In the last 10 minutes, the following code appears to have taken
"NasdaqPosColon" from the value in
"NasdaqRng.Offset(0, 2).Value" on two occasions,
and from the value in
"NasdaqRng.Offset(0, 3).Value" on the other eight.

Am I looking at corruption in the workbook or is there something
intrinsically wrong with the code?

'*****Code start********
Dim NasdaqRng As Range
Dim NasdaqPosColon As Integer

Set NasdaqRng = AIE01.[a65536].End(xlUp).Offset(1, 0)

NasdaqPosColon = InStr(1, NasdaqRng.Offset(0, 2).Value, ":")

If NasdaqPosColon < 0 Then

'More code...

'*****Code finish********


Thank you
Martin




Frank Kabel

Corrupted workbook or code?
 
Hi Martin
code looks o.k.

--
Regards
Frank Kabel
Frankfurt, Germany


Martin wrote:
Using win98 and xl2000. I am extracting data from websites.
The code runs once a minute.

In the last 10 minutes, the following code appears to have taken
"NasdaqPosColon" from the value in
"NasdaqRng.Offset(0, 2).Value" on two occasions,
and from the value in
"NasdaqRng.Offset(0, 3).Value" on the other eight.

Am I looking at corruption in the workbook or is there something
intrinsically wrong with the code?

'*****Code start********
Dim NasdaqRng As Range
Dim NasdaqPosColon As Integer

Set NasdaqRng = AIE01.[a65536].End(xlUp).Offset(1, 0)

NasdaqPosColon = InStr(1, NasdaqRng.Offset(0, 2).Value, ":")

If NasdaqPosColon < 0 Then

'More code...

'*****Code finish********


Thank you
Martin


Martin[_16_]

Corrupted workbook or code?
 
Thanks Frank,

I think I just needed another opinion after having puzzled over
it since 8:30am.

Transferred all to text and rebuilt the workbook, been
working fine for the last 20 minutes. Problem solved I think.

Thanks again

Martin

Frank Kabel wrote in message
...
Hi Martin
code looks o.k.

--
Regards
Frank Kabel
Frankfurt, Germany







All times are GMT +1. The time now is 02:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com