VBA to Create/Populate Form

mack321

New Member
Joined
Sep 15, 2015
Messages
39
Hi genuis',
I normally do pretty good piecing together code to make my little projects work; however, I think I am in way over my head on this one. Basically, there is a form creation that I would like to automate for my team to save them data entry time. I have spent days trying to figure this one out and literally nothing works... mainly because there is some logic that needs to be incorporated... and I just don't have that skill level. The community here has always been great at helping break through these brick walls. Thank you in advance.
What I have is a data table where everything is located. From that, I need to auto generate a form (one for each vendor) in a new tab (preferrably named for the vendor). On the sample Form, I have plugged in the cell reference for the needed data to populate.
I have included links to the Data Table and another link for the Form that would need to be created. I have identified the source for the data on the form.
https://1drv.ms/x/s!AgbiYDs6nWx3hmXAcy15kSCF-baa

https://1drv.ms/x/s!AgbiYDs6nWx3hml7O9dm3Y43Nh7G
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Ok... I'm taking a different approach. I have the code below that works well to create the new sheets and name them... but, I also want it to then copy another sheet, named "MO Upload" to each of the new sheets created by the code below. This is where I am stumped. Any ideas?

Sub CreateSectorSheets()
Dim rng As Range
Dim cl As Range
Dim dic As Object
Dim ky As Variant


Set dic = CreateObject("Scripting.Dictionary")

With Sheets("Enter Qty Here")
Set rng = .Range(.Range("P2"), .Range("P" & .Rows.Count).End(xlUp))
End With

For Each cl In rng
If Not dic.exists(cl.Value) Then
dic.Add cl.Value, cl.Value
End If
Next cl

For Each ky In dic.keys
Sheets.Add(After:=Sheets(Sheets.Count)).Name = dic(ky)
Next ky

End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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