Just starting out? Need help? Post your questions and find answers here.
			
		
		
			
				
								oryaaaaa 							 
						Addict 			
		Posts:  832  		Joined:  Mon Jan 12, 2004 11:40 pm 		
		
											Location:  Okazaki, JAPAN 
							
						
		 
		
						
						
													
							
						
									
						Post 
					 
								by oryaaaaa   »  Sat May 27, 2006 4:25 am 
			
			
			
			
			This is a question from the demonstration user in Japan.
http://forum.oryaaaaa.com/viewtopic.php?p=169 
Can you use it with VBA of Excel etc. by using DLL made with PureBasic? 
Isn't there sample of DLL made with PureBasic that can be tested? 
Thank you
I have not used VBA.  It was not answered. 
Could anyone teach?
Thank you
 
			
			
									
									
						 
		 
				
		
		 
	 
				
			
		
		
			
				
																			
								josku_x 							 
						Addict 			
		Posts:  997  		Joined:  Sat Sep 24, 2005 2:08 pm 		
		
						
						
		 
		
						
						
						 
			 
													
							
						
									
						Post 
					 
								by josku_x   »  Sat May 27, 2006 8:28 am 
			
			
			
			
			VBA is Visual Basic for Applications. I think he wants to use an ActiveX DLL in Excel through VBA. 
 
If you please could ask him if he wants to use an ActiveX DLL, I could help you. 
 
Otherwise, I can give you an example if I find something. But, first it's better to know which DLL type the user wants. 
 
Thanks.
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			
				
								oryaaaaa 							 
						Addict 			
		Posts:  832  		Joined:  Mon Jan 12, 2004 11:40 pm 		
		
											Location:  Okazaki, JAPAN 
							
						
		 
		
						
						
						 
			 
													
							
						
									
						Post 
					 
								by oryaaaaa   »  Sat May 27, 2006 11:06 am 
			
			
			
			
			Thanks. josku_x
The easy one was made and tested here. 
Code: Select all 
ProcedureDLL.l PlusCalc(a.l,b.l)
  ProcedureReturn a+b
EndProcedure  
Code: Select all 
If OpenLibrary(0, "PlusCalc.dll")
   a=CallFunction(0, "PlusCalc",2,3)
   MessageRequester("", Str(a), #MB_OK)
   CloseLibrary(0)
EndIf 
 
Code: Select all 
Private Declare Function PlusCalc Lib "PlusCalc.dll" ( _
    ByVal a As Long, _
    ByVal b As Long) As Long
Private Function ExcelPlusCalc(a As Long, b As Long) As Long
    ExcelPlusCalc = PlusCalc(a, b)
End Function 
 
			
			
									
									
						 
		 
				
		
		 
	 
	
						
		
		
			
				
																			
								josku_x 							 
						Addict 			
		Posts:  997  		Joined:  Sat Sep 24, 2005 2:08 pm 		
		
						
						
		 
		
						
						
						 
			 
													
							
						
									
						Post 
					 
								by josku_x   »  Sat May 27, 2006 11:13 am 
			
			
			
			
			So he wanted a normal DLL and not an ActiveX DLL. Or did I miss something