A
Ayo
Is there a way to declare these statement within a Module so that I don't
have to do it in every Subroutine in the Module?
Set errorWS = Worksheets("Error_MarketList")
Set bulkuploadWS = Worksheets("Bulkupload Result")
Right now I have this:
Private Sub cmdbuildBulkUpload_Click()
Set errorWS = Worksheets("Error_MarketList")
errorWS_lastRow = errorWS.Cells(Rows.Count, "A").End(xlUp).Row
Private Sub cmdupdateDates_Click()
Set errorWS = Worksheets("Error_MarketList")
errorWS_lastRow = errorWS.Cells(Rows.Count, "A").End(xlUp).Row
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Set siteWS = Worksheets("Site Milestone Dates")
Set errorWS = Worksheets("Error_MarketList")
errorWS_lastRow = errorWS.Cells(Rows.Count, "A").End(xlUp).Row
Private Sub cmdupdateMarketlist_Click()
Set updateWS = Worksheets("Updated_MarketList")
Set errorWS = Worksheets("Error_MarketList")
errorWS_lastRow = errorWS.Cells(Rows.Count, "A").End(xlUp).Row
updateWS_lastRow = updateWS.Cells(Rows.Count, "A").End(xlUp).Row - 2
Sub changeMarketList()
Set errorWS = Worksheets("Error_MarketList")
Set updateWS = Worksheets("Updated_MarketList")
Sub build_BulkUpload(Sdate As String, Sstatus As String, cRow As Integer)
Dim siteRow As Long
Dim bulkuploadWS As Worksheet, errorWS As Worksheet
Set errorWS = Worksheets("Error_MarketList")
Set bulkuploadWS = Worksheets("Bulkupload Result")
have to do it in every Subroutine in the Module?
Set errorWS = Worksheets("Error_MarketList")
Set bulkuploadWS = Worksheets("Bulkupload Result")
Right now I have this:
Private Sub cmdbuildBulkUpload_Click()
Set errorWS = Worksheets("Error_MarketList")
errorWS_lastRow = errorWS.Cells(Rows.Count, "A").End(xlUp).Row
Private Sub cmdupdateDates_Click()
Set errorWS = Worksheets("Error_MarketList")
errorWS_lastRow = errorWS.Cells(Rows.Count, "A").End(xlUp).Row
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Set siteWS = Worksheets("Site Milestone Dates")
Set errorWS = Worksheets("Error_MarketList")
errorWS_lastRow = errorWS.Cells(Rows.Count, "A").End(xlUp).Row
Private Sub cmdupdateMarketlist_Click()
Set updateWS = Worksheets("Updated_MarketList")
Set errorWS = Worksheets("Error_MarketList")
errorWS_lastRow = errorWS.Cells(Rows.Count, "A").End(xlUp).Row
updateWS_lastRow = updateWS.Cells(Rows.Count, "A").End(xlUp).Row - 2
Sub changeMarketList()
Set errorWS = Worksheets("Error_MarketList")
Set updateWS = Worksheets("Updated_MarketList")
Sub build_BulkUpload(Sdate As String, Sstatus As String, cRow As Integer)
Dim siteRow As Long
Dim bulkuploadWS As Worksheet, errorWS As Worksheet
Set errorWS = Worksheets("Error_MarketList")
Set bulkuploadWS = Worksheets("Bulkupload Result")