Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello there, I just start to learn VB. I think i have a very easy question for the code masters.
I want to create a SAVE AS button in the ilogic form. I almost success, but I have a problem with data type.
My code is as follows:
InventorVb.DocumentUpdate() ThisDoc.Save Dim NewFileName Dim CurrentFileName = ThisDoc.FileName(False) 'without extension Dim oPath = "H:\PROJETS\" Dim NoContrat = iProperties.Value("Custom", "No. Contrat") NewFileName = InputBox(CurrentFileName + " Save As","Piece Save As") If NewFileName <> 0 Then ThisDoc.Document.SaveAs(oPath & NoContrat & "-" & NewFileName & ".ipt", True) End If
I put this on my ilogic form, and type the new piece name, but it shows the type are wrong.
ERROR says: Conversion of string "R610620A01-002" to type 'Double' is not valid.
It works if I just type numbers like "12345". I know it might the problem with the inputbox, but I don't know how to correct it😂
Looking forward to the replys! Thanks!!!!
Solved! Go to Solution.