Help: VBA Makro programming (Check existence, open + fill; create + fill based on format)

guy123

New Member
Joined
Mar 8, 2016
Messages
1
Hello,
I am working on creating a makro for excel. I want it to check if a specific other Excel workbook is already existing. If so I wanted it to be opend and a few specific fields to be automatically filled from the first workbook. If it does not exist already I would like excel to create the new workbook based on a specific format and be filled from the inital one.

Now to my problem:

So far I tried it with a simple code, which was lost again... So I´m slightly out of my depth, since it has been a few years since I actually coded anything.

I wanted the check to take place in a certain folder and the additional workbooks to be created in the same one as well.
I know it is a lot to ask, however could anybody help me?



Sub Onepage()
If Dir("C:\\stuff\x.xls") <> "" Then
'I can not find the command I used here
Else
'not sure what I used here
End If

End Sub


Thank you!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top