- 
	
	
		
		
			
				
				
				
					
 Saving a project file using vba
				
				
						
							
							
						
						
				
					
						
							Hello everybody,
I'm writing a macro that modifies actual start and actual finish of different tasks from an Excel file. My idea is that this macro runs each hour. I would like that each time the macro modifies the ms project it saves the changes. My problem is that I haven’t found a good code to do that. I was trying using this code: 
 projet.Activate
 msproject.Application.FileSave
where "projet" is the object type Project which I'm working with. That code works where there are just one ms project file open, but when I open more than one file I get this error: The remote server machine does not exist or is unavailable (Error 462).
Sometimes I will have more than one ms Project file open, so, I need to solve this problem.
I Will be so grateful if one of you helps me solving this problem.
Thank you so much.
						
					 
					
				 
			 
			
			
				
				
				
					
						Last edited by Aussiebear; 03-19-2025 at 08:26 PM.
					
					
				
				
				
				
				
					
				
				
				
			 
			
			
		 
	 
		
	
 
- 
	
	
		
		
			
				
				
						
						
				
					
						
							Have you already completed a macro?
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
- 
	
	
		
		
			
				
				
						
						
				
					
						
							Seems to the answers on this post the macro was made)))
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
- 
	
	
		
		
			
				
				
						
						
				
					
						
							Did you change the focus of your object "projet" to a different file? Remember that if you point a project object to one file, and you close it, then the project object no longer exists.
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
- 
	
	
		
		
			
				
				
						
						
							
						
				
					
						
							Have you get the answer. I have also same issue every time when I save file.
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
		
		
		
	
 
	
	
	
	
	
	
	
	
	
	
	
	Tags for this Thread
	
	
	
		
		
			
				
				Posting Permissions
			
			
				
	
		- You may not post new threads
 
		- You may not post replies
 
		- You may not post attachments
 
		- You may not edit your posts
 
		-  
 
	
	
	Forum Rules