ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calling function from a userform (https://www.excelbanter.com/excel-discussion-misc-queries/111787-calling-function-userform.html)

Jeff

Calling function from a userform
 
Hi,

I was calling a function "Sub testmacro()" from a userform and was having a
problem

Private Sub CommandButtonUpdateIInforce_Click()
total_path2 = Application.GetOpenFilename("Excel Files, *.xls")
Call chg_file_location(total_path2, "H7", "Main")
End Sub

give the error = "by refarg type mismatch"

Is there any way to fix this.

Thanks for all your help!




All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com