LMUWE
New Member
Hello all,
Its my first time using VBA macros and I have managed to solve two of the three elements I am looking at but please need your help on the third.
I have a summary sheet which has two columns, one for lamina no. and one for angle of fibres. I have implemented the following which creates a sheet entitled 'Lamina x' for every lamina present and all are set out the same thanks to master sheet '1'.
However, what I am looking to do is ensure that the associated angle is read by the sheet created for that lamina.
I also have a problem where by when I add in more lamina in the summary sheet and run the macro again I get the '400' error/told that a sheet already exists with that name and the additional sheets are not created.
I'd really appreciate your help with this!
Its my first time using VBA macros and I have managed to solve two of the three elements I am looking at but please need your help on the third.
I have a summary sheet which has two columns, one for lamina no. and one for angle of fibres. I have implemented the following which creates a sheet entitled 'Lamina x' for every lamina present and all are set out the same thanks to master sheet '1'.
Code:
Sub CreateSheetsFromAList()
Dim MyCell As Range, MyRange As Range
Set MyRange = Sheets("Input").Range("A4")
Set MyRange = Range(MyRange, MyRange.End(xlDown))
For Each MyCell In MyRange
Sheets("1").Copy After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = MyCell.Value
Next MyCell
End Sub
However, what I am looking to do is ensure that the associated angle is read by the sheet created for that lamina.
I also have a problem where by when I add in more lamina in the summary sheet and run the macro again I get the '400' error/told that a sheet already exists with that name and the additional sheets are not created.
I'd really appreciate your help with this!
Last edited: