Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sha Sha is offline
external usenet poster
 
Posts: 1
Default Error arising in Windows XP having Excel 2002, was fine in WindowsNT having Excel2000

Hi,
I run reports in Excel from Visual Basic. It was working

fine when it was developed on NT Machine having Excel 2000. BUt

now when the application is moved onto XP Machine I have Excel

2002. Now when I run on XP Machine I get a message
"Microsoft Excel cannot find any data to replace.Check if your

search formatting and criteria are defined correctly.If you are

sure that matching data exists in this workbook,it may be on a

protected sheet.Excel cannot replace data on a protected

workseet".
The lines where I get this error message in code is
oleExcel.object.worksheets(XLS_SHEET_NAME).range(" A1:" +

"Z1539").Replace NULL_VALUE, ""

oleExcel.object.worksheets(XLS_SHEET_NAME).range(" AA1:" +

"AZ1539").Replace NULL_VALUE, ""

Null_value is a variable declared and has the value
Private Const NULL_VALUE = -9988998

So please let me know why is thsi happening on a XP Machine

having Excel 2002.
Do I need to do any changes programatically. Please guide me.

Note: I get this message and then when I click the OK button

the report runs fine.It doesn't hang anywhere. But I donot want

to get this message in between.

Thanks in advance for your time.
bsc

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Error arising in Windows XP having Excel 2002, was fine in WindowsNT having Excel2000

why use + when you're concatenating?
use & instead.

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


Sha wrote:

Hi,
I run reports in Excel from Visual Basic. It was working

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Error arising in Windows XP having Excel 2002, was fine in WindowsNT having Excel2000

Hi
use the '&' instead of '+' to concatenate strings.

--
Regards
Frank Kabel
Frankfurt, Germany


Hi,
I run reports in Excel from Visual Basic. It was working

fine when it was developed on NT Machine having Excel 2000. BUt

now when the application is moved onto XP Machine I have Excel

2002. Now when I run on XP Machine I get a message
"Microsoft Excel cannot find any data to replace.Check if your

search formatting and criteria are defined correctly.If you are

sure that matching data exists in this workbook,it may be on a

protected sheet.Excel cannot replace data on a protected

workseet".
The lines where I get this error message in code is
oleExcel.object.worksheets(XLS_SHEET_NAME).range(" A1:" +

"Z1539").Replace NULL_VALUE, ""

oleExcel.object.worksheets(XLS_SHEET_NAME).range(" AA1:" +

"AZ1539").Replace NULL_VALUE, ""

Null_value is a variable declared and has the value
Private Const NULL_VALUE = -9988998

So please let me know why is thsi happening on a XP Machine

having Excel 2002.
Do I need to do any changes programatically. Please guide me.

Note: I get this message and then when I click the OK button

the report runs fine.It doesn't hang anywhere. But I donot want

to get this message in between.

Thanks in advance for your time.
bsc.


---
Message posted from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
Sha Sha is offline
external usenet poster
 
Posts: 1
Default Error arising in Windows XP having Excel 2002, was fine in WindowsNT having Excel2000

Hi,
I still get the same message after using &.

Thanks in advance,
bsc.

Attachment filename: errmsg.gif
Download attachment: http://www.excelforum.com/attachment.php?postid=560095
---
Message posted from http://www.ExcelForum.com/

  #5   Report Post  
Posted to microsoft.public.excel.programming
Sha Sha is offline
external usenet poster
 
Posts: 1
Default Error arising in Windows XP having Excel 2002, was fine in WindowsNT having Excel2000

Hi Krank Kabel,
My issue is solved.
I use this code
first set to false
oleExcel.object.application.displayalerts = False

and then set to true.
oleExcel.object.application.displayalerts = True


Thanks,
Sha

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How format paper as custom on windows xp and excel2000 Julio Kohler Excel Discussion (Misc queries) 4 December 3rd 07 01:39 PM
Excel 2002 : Can I fine tune the Subtotal Table ? Mr. Low Excel Discussion (Misc queries) 4 August 29th 07 02:56 PM
Latest Office patch de-registered EXCEL 2002 .Word/PP fine. Ideas BBTim Excel Discussion (Misc queries) 2 April 17th 06 09:44 PM
Excel2000/2002 migration problem anubhav78 Excel Discussion (Misc queries) 0 June 28th 05 11:47 AM
problem in excel 2002 and windows xp aries58 Excel Programming 6 November 26th 03 04:43 AM


All times are GMT +1. The time now is 05:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"