Hello,
I am seeking some assistance with using the API to streamline a few “Export Selection” operations.
I am relatively new to writing VBA code to extend excel functionality and automate certain tasks, so apologies if my limited capabilities prove to be a limiting variable here. I can google my way through a problem fairly well, but this is a little out of my league and wonder if someone can shed some light.
A little background:
I have created a spreadsheet which I use to print dated operator licenses for the various forklift equipment at my place of employment. The name-cells (F4, M4, F24, M24) are drop downs which summon dates from a matrix of sorts into cells that are formatted to dimensions ready to print. Right now, I use the export selection function to save each range to a PNG file, which is then printed by a PVC badge printer.
My goal includes:
I am looking to automate the process with VBA and some kind of button/form control. Where I am lost is in executing the below sequence of events:
-If F4 is not blank, then select E3:H18
-Export Selection: Preset = Png, 600DPI, RGB, White Canvas; Output = Width 144 Height 277.25 Unit pt
-Save As: licence###.png 'not critical, but the # should increase by one each time a licence is created
-If M4 is not blank, then select L3:O18
-Export selection (operation repeats)
-If F24 is not blank, then select E23:H38
-Export selection (operation repeats)
-If M24 is not blank, then select L23:O38
-Export selection (operation repeats)
I examined the following post, but I am not sure how to apply it to my situation:
Thank you for any assistance that might be provided.