Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Open dbf file then close. do nothing..ignore any message.

Hi,
i am simply trying to open a dbf file then close it without doing
anything and do not want to notify the user plus if any message comes
out i want to ignore it...(opening in the background)... i tried with,

'fileToOpen = "c:/path/musa.dbf"
'filenumber = FreeFile
'Open fileToOpen For Random Access As #filenumber
'Close #filenumber

it did nothing....then i tried with...

'Workbooks.Open Filename:=fileToOpen
'ActiveWindow.Close

this opens up the dbf file in excel and the problem is i have more data
than the excel limit so i got a message.....

Is there a way to open a dbf file in the background and close it
without doing anything to it and ignore any message??...what i found
is, without opening the file, excel can not get the data from the
file....So, just want to open then colse.....doing this thing manually,
everything works ok.

Thank you for you time...

musa.biralo

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Open dbf file then close. do nothing..ignore any message.

Workbooks.Open Filename:=fileToOpen

should be identical to do File=Open and selecting your file in the dialog.

If there are more than 65535 records, then yes, you will not get all the
data, but that would be true for doing it manually.

If you say you have a manual methods that does what you want, then turn on
the macro recorder and perform that manual method. Then turn off the macro
recorder and look at the recorded code.

To suppress alerts

Application.DisplayAlerts = False
' code that could cause an alert
Application.DisplayAlerts = True




--
Regards,
Tom Ogilvy

"musa.biralo" wrote in message
ups.com...
Hi,
i am simply trying to open a dbf file then close it without doing
anything and do not want to notify the user plus if any message comes
out i want to ignore it...(opening in the background)... i tried with,

'fileToOpen = "c:/path/musa.dbf"
'filenumber = FreeFile
'Open fileToOpen For Random Access As #filenumber
'Close #filenumber

it did nothing....then i tried with...

'Workbooks.Open Filename:=fileToOpen
'ActiveWindow.Close

this opens up the dbf file in excel and the problem is i have more data
than the excel limit so i got a message.....

Is there a way to open a dbf file in the background and close it
without doing anything to it and ignore any message??...what i found
is, without opening the file, excel can not get the data from the
file....So, just want to open then colse.....doing this thing manually,
everything works ok.

Thank you for you time...

musa.biralo



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Open dbf file then close. do nothing..ignore any message.

Thanks Tom
you displayalerts = false worked. but what i having is...

if i open the excel manually then thigs are ok...so as you suggested
record macro, i did and it came with same code...

'Workbooks.Open Filename:=fileToOpen
'ActiveWindow.Close

Opening the dbf from this code does not update the formula in my cell.
But i open the dbf file manually, it works... don't know whats going
on....my formula is
=vlookup(a1,path,,,,,........... something like this...

Please help me....

musa.biralo


Tom Ogilvy wrote:
Workbooks.Open Filename:=fileToOpen

should be identical to do File=Open and selecting your file in the dialog.

If there are more than 65535 records, then yes, you will not get all the
data, but that would be true for doing it manually.

If you say you have a manual methods that does what you want, then turn on
the macro recorder and perform that manual method. Then turn off the macro
recorder and look at the recorded code.

To suppress alerts

Application.DisplayAlerts = False
' code that could cause an alert
Application.DisplayAlerts = True




--
Regards,
Tom Ogilvy

"musa.biralo" wrote in message
ups.com...
Hi,
i am simply trying to open a dbf file then close it without doing
anything and do not want to notify the user plus if any message comes
out i want to ignore it...(opening in the background)... i tried with,

'fileToOpen = "c:/path/musa.dbf"
'filenumber = FreeFile
'Open fileToOpen For Random Access As #filenumber
'Close #filenumber

it did nothing....then i tried with...

'Workbooks.Open Filename:=fileToOpen
'ActiveWindow.Close

this opens up the dbf file in excel and the problem is i have more data
than the excel limit so i got a message.....

Is there a way to open a dbf file in the background and close it
without doing anything to it and ignore any message??...what i found
is, without opening the file, excel can not get the data from the
file....So, just want to open then colse.....doing this thing manually,
everything works ok.

Thank you for you time...

musa.biralo


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Open dbf file then close. do nothing..ignore any message.

Nothing I can really tell you about that.

--
Regars,
Tom Ogilvy

"musa.biralo" wrote in message
oups.com...
Thanks Tom
you displayalerts = false worked. but what i having is...

if i open the excel manually then thigs are ok...so as you suggested
record macro, i did and it came with same code...

'Workbooks.Open Filename:=fileToOpen
'ActiveWindow.Close

Opening the dbf from this code does not update the formula in my cell.
But i open the dbf file manually, it works... don't know whats going
on....my formula is
=vlookup(a1,path,,,,,........... something like this...

Please help me....

musa.biralo


Tom Ogilvy wrote:
Workbooks.Open Filename:=fileToOpen

should be identical to do File=Open and selecting your file in the
dialog.

If there are more than 65535 records, then yes, you will not get all the
data, but that would be true for doing it manually.

If you say you have a manual methods that does what you want, then turn
on
the macro recorder and perform that manual method. Then turn off the
macro
recorder and look at the recorded code.

To suppress alerts

Application.DisplayAlerts = False
' code that could cause an alert
Application.DisplayAlerts = True




--
Regards,
Tom Ogilvy

"musa.biralo" wrote in message
ups.com...
Hi,
i am simply trying to open a dbf file then close it without doing
anything and do not want to notify the user plus if any message comes
out i want to ignore it...(opening in the background)... i tried with,

'fileToOpen = "c:/path/musa.dbf"
'filenumber = FreeFile
'Open fileToOpen For Random Access As #filenumber
'Close #filenumber

it did nothing....then i tried with...

'Workbooks.Open Filename:=fileToOpen
'ActiveWindow.Close

this opens up the dbf file in excel and the problem is i have more data
than the excel limit so i got a message.....

Is there a way to open a dbf file in the background and close it
without doing anything to it and ignore any message??...what i found
is, without opening the file, excel can not get the data from the
file....So, just want to open then colse.....doing this thing manually,
everything works ok.

Thank you for you time...

musa.biralo




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
error message : I can't close my PERSONAL.XLS file Roger[_2_] New Users to Excel 2 November 14th 09 09:56 PM
How to disable save message when I click the cross to close the file hon123456 Excel Programming 2 June 21st 06 07:17 AM
Warning message on file close Lambtwo Excel Worksheet Functions 1 October 25th 05 03:31 AM
Adding an error message at close of file when criteria are met Dave Excel Discussion (Misc queries) 3 August 12th 05 07:56 PM
Automate open file, update links, run macro, close and save file Geoff[_7_] Excel Programming 2 August 26th 03 10:13 PM


All times are GMT +1. The time now is 08:28 PM.

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"