Help: Loop through drop down list and create pdf files VBA close but not working....

PowRider

New Member
Joined
Oct 18, 2014
Messages
12
Hi experts,
I have a very similar situation to this post http://www.mrexcel.com/forum/excel-...hrough-drop-down-list-creating-pdf-files.html
I successfully use the code posted in that thread referenced to create a file for each item in the dropdown list.
PROBLEM:
My dropdown list is "store number" which are stored as text (eg 00202).
I believe when the code loops through, it changes the validation list from text to numbers and resulted in the data not updating.
In other words, every file came up to have blank cells/charts.
Please help me solve this.

Thanks!!
 
Simply format the cell containing your dropdown list as "Text". Alternatively, you can add an apostrophe to the beginning of the string entered in the cell...

Code:
        For Each c In inputRange
        
            Range("AD5").Value = [COLOR=#ff0000]"'" & [/COLOR]c.Value
       
            'etc
            '
            '
               
        Next c

Hope this helps!
 
Upvote 0

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