I am trying to save the file since yesterday this way.
File saves well but doesnt open back. When I try to open the file It opens in vba editor but not the usual excel way.Please Login or Register to view this content.
I am trying to save the file since yesterday this way.
File saves well but doesnt open back. When I try to open the file It opens in vba editor but not the usual excel way.Please Login or Register to view this content.
Last edited by Paul; 06-26-2012 at 11:26 PM. Reason: Added CODE tags for new user. Please do so yourself in the future.
In Excel 2007+ it is good to include the file extension in the nFileName. Also, there is a VBA version of the TEXT function called FORMAT, you format a NOW to do the date and time all at once:
Please Login or Register to view this content.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
All those things are working fine. The problem is that after i run my logic and save the macro using this. Its saving a file which i am not able to open with excel. But the file shows up in vba editor
Try this:
Please Login or Register to view this content.
The problem is taht after I save that file like that, I cannot open the file again. I has Data (I seen from Windows Properties). I closed Excel.exe from taskmanager and then tried to open the file. I shows empty excel window but when i go the VBA editor file is shown there
When you save the workbook it closes. The macro stops at that point & the variables are cleared from memory. The code needs to be in an add-in or personal workbook
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
Can you suggest a way around thi problem?
Run the macro from a different workbook.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks