Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Getprivateprofilestring Crashes in Vista SP1

I have a macro which works fine on Excel 2003 abut now crashes in
Excel 2007 since I upgraded Vista to SP1. It calls
Getprivateprofilestring to read an ini file several times and will
work for a few then simply crashes Excel without giving any error. It
actually seem to return the value but crash on exiting the Function
which called it. Any help gratefully received!
John
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Getprivateprofilestring Crashes in Vista SP1

Could you post the relevant code?

RBS


"John" wrote in message
...
I have a macro which works fine on Excel 2003 abut now crashes in
Excel 2007 since I upgraded Vista to SP1. It calls
Getprivateprofilestring to read an ini file several times and will
work for a few then simply crashes Excel without giving any error. It
actually seem to return the value but crash on exiting the Function
which called it. Any help gratefully received!
John


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Getprivateprofilestring Crashes in Vista SP1

On 27 Apr, 23:01, "RB Smissaert"
wrote:
Could you post the relevant code?

RBS

"John" wrote in message

...

I have a macro which works fine on Excel 2003 abut now crashes in
Excel 2007 since I upgraded Vista to SP1. It calls
Getprivateprofilestring to read an ini file several times and will
work for a few then simply crashes Excel without giving any error. It
actually seem to return the value but crash on exiting the Function
which called it. Any help gratefully received!
John


Hi Bart
I have found the solution. It is actually do with dimming variables
not Getprivateprofilestring. I had dimmed some as
Dim icnt1,icnt2,icnt3 as integer
and prior to SP1 this worked fine but now it crashes. It seems to take
anything which is not explicitly dimmed as a variant but instead of
giving a nice wrong datatype error it crashed out. So if I put
Dim icnt1 as integer
Dim icnt2 as integer
etc it works fine.
Just another annoyance in vista!
John
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Getprivateprofilestring Crashes in Vista SP1

OK, well you learned something useful there as
that is how variables should be done in any case.

RBS


"John" wrote in message
...
On 27 Apr, 23:01, "RB Smissaert"
wrote:
Could you post the relevant code?

RBS

"John" wrote in message

...

I have a macro which works fine on Excel 2003 abut now crashes in
Excel 2007 since I upgraded Vista to SP1. It calls
Getprivateprofilestring to read an ini file several times and will
work for a few then simply crashes Excel without giving any error. It
actually seem to return the value but crash on exiting the Function
which called it. Any help gratefully received!
John


Hi Bart
I have found the solution. It is actually do with dimming variables
not Getprivateprofilestring. I had dimmed some as
Dim icnt1,icnt2,icnt3 as integer
and prior to SP1 this worked fine but now it crashes. It seems to take
anything which is not explicitly dimmed as a variant but instead of
giving a nice wrong datatype error it crashed out. So if I put
Dim icnt1 as integer
Dim icnt2 as integer
etc it works fine.
Just another annoyance in vista!
John


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
vista ramone Setting up and Configuration of Excel 2 September 28th 08 12:40 AM
XP V Vista Arisaiglass Excel Discussion (Misc queries) 3 March 10th 08 08:02 PM
Vista and XP floss Excel Discussion (Misc queries) 1 November 3rd 07 08:58 PM
Vista Doreen P Excel Discussion (Misc queries) 0 April 5th 07 01:56 AM
Vista Bill Martin[_2_] Excel Programming 1 April 5th 06 03:55 AM


All times are GMT +1. The time now is 05:11 PM.

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

About Us

"It's about Microsoft Excel"