Chris Macro
Well-known Member
- Joined
- Nov 2, 2011
- Messages
- 1,345
- Office Version
- 365
- Platform
- Windows
I am getting this error on the 3rd line of my code (MyVariable = Join.....). Any ideas on what could be causing this?
<font face=Calibri><SPAN style="color:#00007F">Sub</SPAN> Macro1()<br><SPAN style="color:#00007F">Dim</SPAN> Lastrow <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN><br><SPAN style="color:#00007F">Dim</SPAN> MasterEmailList <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Variant</SPAN>, MyVariable <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN><br><br><br><SPAN style="color:#007F00">'Combine Mill Email Groups into One Large String</SPAN><br> Lastrow = sheet4.Cells(Rows.Count, "J").End(xlUp).Row<br> <br> MasterEmailList = sheet4.Range("J1:J" & Lastrow)<br> MyVariable = Join(Application.Transpose(MasterEmailList), "; ")<br> sheet4.Cells(Lastrow + 1, "J") = MyVariable<br> <br><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>
<font face=Calibri><SPAN style="color:#00007F">Sub</SPAN> Macro1()<br><SPAN style="color:#00007F">Dim</SPAN> Lastrow <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Long</SPAN><br><SPAN style="color:#00007F">Dim</SPAN> MasterEmailList <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Variant</SPAN>, MyVariable <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">String</SPAN><br><br><br><SPAN style="color:#007F00">'Combine Mill Email Groups into One Large String</SPAN><br> Lastrow = sheet4.Cells(Rows.Count, "J").End(xlUp).Row<br> <br> MasterEmailList = sheet4.Range("J1:J" & Lastrow)<br> MyVariable = Join(Application.Transpose(MasterEmailList), "; ")<br> sheet4.Cells(Lastrow + 1, "J") = MyVariable<br> <br><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>