How to create pmdx File en BasicMaker end save Automate on Disk

Post Reply
Gimy
Posts: 6
Joined: Tue Sep 09, 2025 12:27 am

How to create pmdx File en BasicMaker end save Automate on Disk

Post by Gimy »

Hello, if someone can Help...
so far I can write on a sheet a Data and in final on Close the PlanMaker shaw up quest about if I want to save the untitled 1 file and what Name I want to give... Buy the way This is not a Automation; I go in PlanMaker and I can in 1 minut creat a file and seve them.
Hire what I do : I start with a piece of code find in Manual:
Dim pm as Object
Dim newDoc as Object
Dim newSheet as Object

Set pm = CreateObject("PlanMaker.Application")
Set newDoc = pm.Workbooks.Add
Set newSheet = newDoc.Sheets.Add("test")
HERE I change test with the name that I whant: EX: Set newSheet = newDoc.Sheets.Add("Test" &gFixNr$ &"R" &UpDateDate$ &".pmdx")

I do my Program...
In final I don't find the code to Save on disk... with all try

So the final:
pm.Application.Quit
Set pm = Nothing
Shaw up PM whit the possibility to NAME the untitled file and Save ( in the file on the bassement stay the NAME of the sheet :"Test" &gFixNr$ &"R" &UpDateDate$ &".pmdx" BUT the Plan Maker file is Untitlet 1 or 2...
Thanks for some resolutions! Gimy
'-----------------------------------------------------
Hello, here I try to resolve this myself:
The first Obstacle is that the File I want to create have some data in his name ( Client Nr. and date ).
So I pass this by create the File before the activation of the BasicMaker automation that I do.
Here is the result :
'===========================================================
' OPEN A File and Update them - PlanMaker SHEET
'-----------------------------------------------------------
Dim FName As String
Dim row, col as Integer
row = 1 : col = 1
'FName$ = "c:\abc\Test\" &gFixNr &dUpdate &"R" &".pmdx"
' was not posible that is a File.Add
' the File FName$ must exist on Disk , so the File will be
FName$ = "c:\abc\Test\CLI758REuz.pmdx"
'=============================================
Dim pm as Object
Set pm = CreateObject("PlanMaker.Application")
pm.Application.RecentFiles.Add FName$
pm.Workbooks.Open FName$
'=============================================

...
row = 1
...

'================ Update ROW in Worksheet ====
' row 1, is the FrontName on the Sheet
row = row + 1
For col = 1 to 13
pm.Cells.Item(row, col).Value = XYZ$(col - 1)
Next col
'=============================================
...
' Final
pm.Workbooks(FName$).Save

pm.Application.Quit
Set pm = Nothing

' Salutations from Gimy Bucharest
Post Reply

Return to “BasicMaker 2021 for Windows”