View Single Post
 
Old 10-21-2020, 08:43 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,164
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Just closing this off after some interactions offline with the Mike...

This issue seems to be resolved now with some of the logic sorted out. The Labels macro now set to take some inputs passed in from the userform.
Code:
'Call the Labels function with some inputs
  Labels sTo:=Me.cbTo.Column(3), sFrom:=Me.cbFrom.Column(3), iRow:=Me.cbRow

Function Labels(sTo As String, sFrom As String, iRow As Integer)
  Dim aSheet As Worksheet, aRng As Range
  
  Set aSheet = ActiveWorkbook.Sheets("Outer Envelope")
  aSheet.Range("A1:B7").ClearContents
  Set aRng = aSheet.Range("A" & iRow)
  aRng.Value = sTo
  aRng.Offset(0, 1).Value = sFrom
      
End Function
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote