Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
error message : I can't close my PERSONAL.XLS file | New Users to Excel | |||
How to disable save message when I click the cross to close the file | Excel Programming | |||
Warning message on file close | Excel Worksheet Functions | |||
Adding an error message at close of file when criteria are met | Excel Discussion (Misc queries) | |||
Automate open file, update links, run macro, close and save file | Excel Programming |