Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reading and writing to ini files in Excel 2007

I have thousands of Excel VBA rows created in Excel 2003 which now must be
migrated to Excel 2007. My computer has Office 2007 Professional and Vista
Business whilst my client is just about to migrate to Office 2007 but will
keep Windows XP.
My present API code for reading and writing to ini files just does not work
in Excel 2007. In fact, nothing happens.
I have spent a full day trying to find a solution on the web but without
success. My experience from Excel 2003 is that when writing to a non-existing
..ini file it will be created in the C:\Windows folder. Can anyone give useful
info about this?

It would be of great value to find a book/site or whatever info listing all
the objects/methods etc that has to be changed when migrating from Office
2003 to 2007. Is there such an info anywhere?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reading and writing to ini files in Excel 2007

Bob,
After some further testing I've found that the problem is neither my code
nor Excel 2007 but Vista! In Vista (which is new to me) there is a function
"User Account Control" whose default setting is "On". Obviously it considers
"C:\Windows" a protected area whereby the ini file is not created first time
you write to it. And there is no alert informing why this is omitted. But
once the ini file is there, Vista allows it to be edited also if "User
Account Control" is enabled.
When disabling the "User Account Control" my code works fine. If you are not
familiar with this Vista "security" nonsense perhaps we both learned from my
findings.

Thanks for responding anyhow! //Rolf G
--
RoGu


"Bob Phillips" wrote:

What API method is that Rolf?

I use GetPrivateProfileString, WritePrivateProfileString, etc. They work
fine in 2007.

--
__________________________________
HTH

Bob

"Rolf Gustafsson" <Rolf wrote in
message ...
I have thousands of Excel VBA rows created in Excel 2003 which now must be
migrated to Excel 2007. My computer has Office 2007 Professional and Vista
Business whilst my client is just about to migrate to Office 2007 but will
keep Windows XP.
My present API code for reading and writing to ini files just does not
work
in Excel 2007. In fact, nothing happens.
I have spent a full day trying to find a solution on the web but without
success. My experience from Excel 2003 is that when writing to a
non-existing
.ini file it will be created in the C:\Windows folder. Can anyone give
useful
info about this?

It would be of great value to find a book/site or whatever info listing
all
the objects/methods etc that has to be changed when migrating from Office
2003 to 2007. Is there such an info anywhere?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Reading and writing to ini files in Excel 2007

Rolf,

I have avoided Vista like the plague, and have no intention of ever loading
it. No doubt I will encounter similar nannying functionality when I
implement W7.

--
__________________________________
HTH

Bob

"Rolf Gustafsson" wrote in message
...
Bob,
After some further testing I've found that the problem is neither my code
nor Excel 2007 but Vista! In Vista (which is new to me) there is a
function
"User Account Control" whose default setting is "On". Obviously it
considers
"C:\Windows" a protected area whereby the ini file is not created first
time
you write to it. And there is no alert informing why this is omitted. But
once the ini file is there, Vista allows it to be edited also if "User
Account Control" is enabled.
When disabling the "User Account Control" my code works fine. If you are
not
familiar with this Vista "security" nonsense perhaps we both learned from
my
findings.

Thanks for responding anyhow! //Rolf G
--
RoGu


"Bob Phillips" wrote:

What API method is that Rolf?

I use GetPrivateProfileString, WritePrivateProfileString, etc. They work
fine in 2007.

--
__________________________________
HTH

Bob

"Rolf Gustafsson" <Rolf wrote in
message ...
I have thousands of Excel VBA rows created in Excel 2003 which now must
be
migrated to Excel 2007. My computer has Office 2007 Professional and
Vista
Business whilst my client is just about to migrate to Office 2007 but
will
keep Windows XP.
My present API code for reading and writing to ini files just does not
work
in Excel 2007. In fact, nothing happens.
I have spent a full day trying to find a solution on the web but
without
success. My experience from Excel 2003 is that when writing to a
non-existing
.ini file it will be created in the C:\Windows folder. Can anyone give
useful
info about this?

It would be of great value to find a book/site or whatever info listing
all
the objects/methods etc that has to be changed when migrating from
Office
2003 to 2007. Is there such an info anywhere?






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
Need sample for reading value from and writing value to cell E53 from outside Excel Tony Bansten Excel Discussion (Misc queries) 1 June 17th 08 07:03 AM
Need sample for reading value from and writing value to cell E53 from outside Excel Tony Bansten Excel Programming 5 June 17th 08 07:03 AM
question about Excel file writing and reading Albert Ge Excel Programming 2 April 25th 05 09:12 AM
Reading data from an excel sheet and writing to another Rain Excel Programming 1 January 19th 05 09:25 AM
Fast reading/writing of CSV files Chris Jakeman Excel Programming 2 August 6th 04 10:29 AM


All times are GMT +1. The time now is 12:32 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"