CADfunk MC
2008-07-22, 11:58 AM
Hi All
I have a VBA macro that reads in a textfile, re-arranges the content, and saves it as a .cvs for further use in a drawing.
All goes as desired up untill the moment I quit excel. I get 3 messages (translated from dutch):
1) Do you want to save the changes in MyFile.cvs file? (yes)
2) Sure? (Yes)
3) MyFile.cvs may contain functions that are not compatibel with CVS (seperated bij listmarkings). Do you want to preserve the content? (Yes)
I would like these prompts/msgboxes to get the "Yes" answer automtically. I 've tried some things but they didn 't work:
' ActiveWorkbook.Saved = True
' Ex.ActiveWorkbook.Save
' ActiveWorkbook.Close
' ThisWorkbook.Save
' ThisWorkbook.Saved = True
' Saved = True
' Application.DisplayAlerts = False
These things fool the program in to thinking the content has been saved properly, or they simply skip the saving option. They do not have the desired effect.
I found an option that answers questions from outlook automatically. It uses the MailItemActions collection to retrieve the corresponding action. Then you can call Action.Execute.
'Dim myItem As Outlook.MailItem
'Set myItem = objAppt.Actions("Yes").Execute
'myItem2.Send
I also thought perhaps the action could be retrieved with something I found on msdn, but had no luck:
Ex.Application.TransitionMenuKeyAction = xlLotusHelp
Is anybody acquainted enough with excel (and VBA) to be able to answer this question? I hope someone can help me out of this. I put it in this CAD forum because I think maybe many people use Excel to do some things CAD doesn 't.
Kind Regards, Me.Mike.Has Not Not Not Answer
I have a VBA macro that reads in a textfile, re-arranges the content, and saves it as a .cvs for further use in a drawing.
All goes as desired up untill the moment I quit excel. I get 3 messages (translated from dutch):
1) Do you want to save the changes in MyFile.cvs file? (yes)
2) Sure? (Yes)
3) MyFile.cvs may contain functions that are not compatibel with CVS (seperated bij listmarkings). Do you want to preserve the content? (Yes)
I would like these prompts/msgboxes to get the "Yes" answer automtically. I 've tried some things but they didn 't work:
' ActiveWorkbook.Saved = True
' Ex.ActiveWorkbook.Save
' ActiveWorkbook.Close
' ThisWorkbook.Save
' ThisWorkbook.Saved = True
' Saved = True
' Application.DisplayAlerts = False
These things fool the program in to thinking the content has been saved properly, or they simply skip the saving option. They do not have the desired effect.
I found an option that answers questions from outlook automatically. It uses the MailItemActions collection to retrieve the corresponding action. Then you can call Action.Execute.
'Dim myItem As Outlook.MailItem
'Set myItem = objAppt.Actions("Yes").Execute
'myItem2.Send
I also thought perhaps the action could be retrieved with something I found on msdn, but had no luck:
Ex.Application.TransitionMenuKeyAction = xlLotusHelp
Is anybody acquainted enough with excel (and VBA) to be able to answer this question? I hope someone can help me out of this. I put it in this CAD forum because I think maybe many people use Excel to do some things CAD doesn 't.
Kind Regards, Me.Mike.Has Not Not Not Answer