Change to class

Hi,
Originally the following class is not "Overriddable"

Public Class Overriddable ExportSalesDataToSunAccountReport : Inherits ToolbarReport

Open in new window

after the change to the above, what other change I need to perform, as I've got

Error	3	Type 'ExportSalesDataToSunAccountReport' is not defined.

Open in new window

due to this line

        Dim report As New ExportSalesDataToSunAccountReport With {.ReportID = CType(sender, RibbonButton).Tag}

Open in new window

while I've changed methods within the class from "private" to "protected"
LVL 11
HuaMin ChenProblem resolverAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chaauCommented:
overridable modifier cannot be used with class. It should be used with function, property or sub of the parent class to tell the compiler that the derived classes may override the function, property or sub. In your case you need to modify the ToolbarReport class and make the members you want be overriden overridable (e.g. Overridable Sub MethodForSomethig()). Then in your ExportSalesDataToSunAccountReport class make the method with the Overrides modifier:
Public Class ExportSalesDataToSunAccountReport Inherits ToolbarReport 
 Overrides Sub MethodForSomethig()
   ' do something 
 End Sub
End Class

Open in new window

0
HuaMin ChenProblem resolverAuthor Commented:
Many thanks Chaau.
The case is, there are several other places, which are referring to such class, and they're using the function like

    Protected Function DataRowHeader() As ExcelFormatItem()

Open in new window


while I now change the codes of such Function, specifically due to one place, while I want to keep nothing changes for "other places" as they still need th old codes.
0
chaauCommented:
If they don't use the Overrides modifier they will continue use the parent code
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

HuaMin ChenProblem resolverAuthor Commented:
Does it mean, I do Overrides it, within the specific new place, like
    Public Overrides ReadOnly Property DataRowHeader As ExcelFormatItem()
        Get
            Return ExcelFormatColumns(1, New ExcelFormatItem("店組別") With {.SQLDataType = DT_VARCHAR(10)},
			...

Open in new window

and no need to put "Overriddable" to class?
0
chaauCommented:
Here is the extract from MSDN:
The following rules apply to overriding methods.
    You can only override members that are marked with the Overridable keyword in their base class.
    By default, properties and methods are NotOverridable.
    Overridden members must have the same arguments as the inherited members from the base class.
    The new implementation of a member can call the original implementation in the parent class by specifying MyBase before the method name.
0
HuaMin ChenProblem resolverAuthor Commented:
Here are the original codes

Imports MySql.Data.MySqlClient
Imports System.IO

Public Class ExportSalesDataToSunAccountReport : Inherits ToolbarReport

    Private WithEvents OptionForm As New SalesReportOptionForm
    Private ds As ExportDataToSunAccountDataSourceBase
    Private transportType As ParameterCollection = New ParameterCollection

    Public Sub New()
        'ReportID = "ExportSalesDataToSunAccount"
    End Sub

    Private Function DataRowHeader() As ExcelFormatItem()
        Dim EFList As New List(Of ExcelFormatItem)
        EFList.Add(New ExcelFormatItem("Transaction_Reference") With {.ColAlias = "Transaction_Reference", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("Customer_Code") With {.ColAlias = "Customer_Code", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("Currency_Code") With {.ColAlias = "Currency_Code", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("Transaction_Date") With {.ColAlias = "Transaction_Date", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CPAYTERM") With {.ColAlias = "CPAYTERM", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("NDISRATE") With {.ColAlias = "NDISRATE", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("DDISAMT") With {.ColAlias = "DDISAMT", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CLOCCODE") With {.ColAlias = "cloccode", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CCUSORDNO") With {.ColAlias = "CCUSORDNO", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CSALORDNO") With {.ColAlias = "CSALORDNO", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("NACCQTY") With {.ColAlias = "NACCQTY", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CITEM") With {.ColAlias = "CITEM", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("NITEMQTY") With {.ColAlias = "NITEMQTY", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CCODE") With {.ColAlias = "CCODE", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CSIZE") With {.ColAlias = "CSIZE", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("END") With {.ColAlias = "END", .Format = TEXT_FORMAT, .ColWidth = 10})
        Return ExcelFormatColumns(1, EFList.ToArray)
    End Function

    Private Sub GenerateReportSheet()
        ShowMessage("正在建立工作表...")
        Dim rowIndex As Integer = StartRowIndex
        CreateExcelSheet(String.Format("{0}-{1:HHmmss}", ReportID, Now))
        ExcelApp.Calculation = Excel.XlCalculation.xlCalculationManual
        Dim headerRow1 As Integer = rowIndex : rowIndex += 1

        Dim rowHeader As ExcelFormatItem() = DataRowHeader()
        For Each col As ExcelFormatItem In rowHeader
            SetColumnValue(DataSheet, headerRow1, ColumnIndex(col.FromRange), col.Caption)
            With CType(DataSheet.Columns(String.Format("{0}:{1}", col.FromRange, col.ToRange)), Excel.Range)
                .NumberFormat = col.Format
                .ColumnWidth = col.ColWidth
                If col.HAlign <> Excel.XlHAlign.xlHAlignGeneral Then .HorizontalAlignment = col.HAlign
            End With
        Next

        For Each item In ds.OrderBy(Function(x) x.TransactionDate)
            SetColumnValue(DataSheet, rowIndex, 1, String.Format("""{0}""", item.TransactionRef),
                                                    item.clientcode,
                                                    item.currcode,
                                                    item.TransactionDate,
                                                    "",
                                                    "",
                                                    "",
                                                    item.cloccode,
                                                    "",
                                                    "",
                                                    "0",
                                                    "",
                                                    item.nitemqty,
                                                    item.ccode,
                                                    item.csize,
                                                    "END")
            rowIndex += 1
        Next

        ExcelApp.Calculation = Excel.XlCalculation.xlCalculationAutomatic
        FinializeSheet()

        SetPageThinMargin(DataSheet)
        SetFitToPage(DataSheet, 1, 0)
        With DataSheet.PageSetup
            .CenterHorizontally = False
            .CenterVertically = False
            .PrintHeadings = False
            .PrintGridlines = False
            .PrintTitleRows = "1:3"
            .PrintComments = Excel.XlPrintLocation.xlPrintNoComments
            .Orientation = Excel.XlPageOrientation.xlPortrait
            .LeftFooter = ExcelFont(8) & "Report ID: " & ReportID & vbCr & String.Format("Data as at {0:dd/MM/yyyy HH:mm:ss}", GetLastDataUpload)
            .RightFooter = ExcelFont(8) & String.Format("Page {0} of {1}" & vbCr & "Print at {2} {3}", ExcelPageNumber, ExcelTotalPage, ExcelDate, ExcelTime)
        End With
    End Sub

    Protected Overrides Sub CreateReportSheet()
        ShowMessage("正在讀取數據...")
        Dim conn As MySqlConnection = OpenConnection()
        'ds = New ExportSalesDataToSunAccountDataSource(OptionForm, {GA_DBNAME, SM_DBNAME}, conn)
        Using writer As StreamWriter = New StreamWriter("c:\\xxg0.txt")
            'writer.WriteLine("xxc " + String.Format("{0},,", item.TransactionDate))
            writer.WriteLine("xx 0 " + "ee ")
        End Using

        ds = New ExportInterComSalesDataToSunAccountDataSource(OptionForm, {GA_DBNAME, SM_DBNAME}, conn)
        TotalLoadedRows += ds.LoadReportData
        CloseConnection(conn)
        ExcelApp.ScreenUpdating = False
        GenerateReportSheet()
        ExcelApp.ScreenUpdating = True
    End Sub

    Public Sub Execute()
        OptionForm.ReportName = ReportName
        OptionForm.SelectAllBrandsOnLoad = True
        OptionForm.CustomGroupComboBox.Enabled = True
        OptionForm.CustomGroupComboBox.ResetText()
        OptionForm.CustomGroupComboBox.Items.Clear()
        OptionForm.CustomGroupComboBox.Items.AddRange({"Sales Import", "Cost Import", "Purchase Import", "InterCom Sales Import"})
        OptionForm.CustomGroupComboBox.DropDownStyle = ComboBoxStyle.DropDownList
        OptionForm.CustomGroupComboBox.SelectedIndex = 0
        OptionForm.PercentMiddleValueEntryEnabled = False
        OptionForm.ShowCompareOptionsEnabled = False
        OptionForm.DateCompareCheckBox.Checked = False
        OptionForm.YearCompareCheckBox.Checked = False
        OptionForm.WeekCompareCheckBox.Checked = False
        OptionForm.DateCompareCheckBox.Enabled = False
        OptionForm.YearCompareCheckBox.Enabled = False
        OptionForm.WeekCompareCheckBox.Enabled = False
        OptionForm.UseShortColorCheckBox.Checked = False
        OptionForm.UseShortColorCheckBox.Enabled = False
        OptionForm.DateSubGroupFromComboBox.Enabled = False
        OptionForm.YearSubGroupFromComboBox.Enabled = False
        OptionForm.WeekSubGroupFromComboBox.Enabled = False
        OptionForm.SuppressBlankColumnCheckBox.Enabled = False
        OptionForm.DateRangeButtonsEnabled = False
        OptionForm.ShowQtyCheckBox.Enabled = False
        OptionForm.ShowAmountCheckBox.Enabled = False
        OptionForm.DataSizeOptionEnabled = False
        OptionForm.DataSizeOptionVisible = False
        OptionForm.SameAdditionalFilterToAllRanges = False
        OptionForm.DataSize = SalesDataSize.ProductLevel
        OptionForm.DateFormatOptionGroupBox.Enabled = False
        OptionForm.ReportOptionGroupBox.Enabled = True
        OptionForm.FinanceMethodCheckBox.Checked = True
        OptionForm.SheetOptionGroupBox.Enabled = False
        OptionForm.IncludeAccessoriesCheckBox.Checked = True
        OptionForm.OnlyOneDate = True
        OptionForm.ShowCustomOptions = True
        OptionForm.DiscountStepEnabled = False
        OptionForm.DefaultShopLineCode = ALL_LOCATIONS_NOMOCKUP
        OptionForm.DefaultShopByLine = True
        OptionForm.SetCriteriaPage(CriteriaPage.ByYearMonth)
        OptionForm.SetSingleMonthSelection(-1)
        OptionForm.IncludeOthersCheckBox.Checked = True
        OptionForm.ShoppingBagCheckBox.Checked = True
        If OptionForm.ShowDialog() = Windows.Forms.DialogResult.OK Then
            Dim lastSheet As Excel.Worksheet = ExcelApp.ActiveSheet
            If OptionForm.PlaceOnLocationCheckBox.Checked Then lastSheet.Activate()
            GenerateReport()
        End If
    End Sub
End Class

Open in new window


while here is the specific place, which is calling the event (in above)

    Protected Overrides Sub CreateReportSheet()
        ShowMessage("正在讀取數據...")
        Dim conn As MySqlConnection = OpenConnection()
        'ds = New ExportSalesDataToSunAccountDataSource(OptionForm, {GA_DBNAME, SM_DBNAME}, conn)

        ds = New ExportInterComSalesDataToSunAccountDataSource(OptionForm, {GA_DBNAME, SM_DBNAME}, conn)
        TotalLoadedRows += ds.LoadReportData
        CloseConnection(conn)
        ExcelApp.ScreenUpdating = False
        GenerateReportSheet()
        ExcelApp.ScreenUpdating = True
    End Sub

Open in new window

how can I make GenerateReportSheet "Overrides" and ensure it has its own "version"
0
chaauCommented:
Use MustOverride in the base class. This will force all derived classes to implement the method. Read here about the override modifiers
0
HuaMin ChenProblem resolverAuthor Commented:
What to change to GenerateReportSheet, specifically to ensure it has its own "version"?
0
HuaMin ChenProblem resolverAuthor Commented:
actually I have specific different codes to

SetColumnValu
DataRowHeader

how?
0
chaauCommented:
You will not be able to use specific code in each derived class. I recommend you override the whole GenerateReportSheet and make the SetColumnValue DataRowHeader private in each class
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HuaMin ChenProblem resolverAuthor Commented:
Here is the specific place

        Dim conn As MySqlConnection = OpenConnection()
        'ds = New ExportSalesDataToSunAccountDataSource(OptionForm, {GA_DBNAME, SM_DBNAME}, conn)

        ds = New ExportInterComSalesDataToSunAccountDataSource(OptionForm, {GA_DBNAME, SM_DBNAME}, conn)
        TotalLoadedRows += ds.LoadReportData
        CloseConnection(conn)
        ExcelApp.ScreenUpdating = False
        GenerateReportSheet()
        ExcelApp.ScreenUpdating = True

Open in new window

that is referring to the above class. And I have specific codes to

SetColumnValu
DataRowHeader

how to do the change?
0
chaauCommented:
Can't you make them overridable instead?
0
HuaMin ChenProblem resolverAuthor Commented:
I want to have specific codes to

SetColumnValu
DataRowHeader
0
HuaMin ChenProblem resolverAuthor Commented:
If we see the following codes

Imports MySql.Data.MySqlClient
Imports System.IO

Public Class ExportSalesDataToSunAccountReport : Inherits ToolbarReport

    Private WithEvents OptionForm As New SalesReportOptionForm
    Private ds As ExportDataToSunAccountDataSourceBase
    Private transportType As ParameterCollection = New ParameterCollection

    Public Sub New()
        'ReportID = "ExportSalesDataToSunAccount"
    End Sub

    Private Function DataRowHeader() As ExcelFormatItem()
        Dim EFList As New List(Of ExcelFormatItem)
        EFList.Add(New ExcelFormatItem("Transaction_Reference") With {.ColAlias = "Transaction_Reference", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("Customer_Code") With {.ColAlias = "Customer_Code", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("Currency_Code") With {.ColAlias = "Currency_Code", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("Transaction_Date") With {.ColAlias = "Transaction_Date", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CPAYTERM") With {.ColAlias = "CPAYTERM", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("NDISRATE") With {.ColAlias = "NDISRATE", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("DDISAMT") With {.ColAlias = "DDISAMT", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CLOCCODE") With {.ColAlias = "cloccode", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CCUSORDNO") With {.ColAlias = "CCUSORDNO", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CSALORDNO") With {.ColAlias = "CSALORDNO", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("NACCQTY") With {.ColAlias = "NACCQTY", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CITEM") With {.ColAlias = "CITEM", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("NITEMQTY") With {.ColAlias = "NITEMQTY", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CCODE") With {.ColAlias = "CCODE", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("CSIZE") With {.ColAlias = "CSIZE", .Format = TEXT_FORMAT, .ColWidth = 10})
        EFList.Add(New ExcelFormatItem("END") With {.ColAlias = "END", .Format = TEXT_FORMAT, .ColWidth = 10})
        Return ExcelFormatColumns(1, EFList.ToArray)
    End Function

    Private Sub GenerateReportSheet()
        ShowMessage("正在建立工作表...")
        Dim rowIndex As Integer = StartRowIndex
        CreateExcelSheet(String.Format("{0}-{1:HHmmss}", ReportID, Now))
        ExcelApp.Calculation = Excel.XlCalculation.xlCalculationManual
        Dim headerRow1 As Integer = rowIndex : rowIndex += 1

        Dim rowHeader As ExcelFormatItem() = DataRowHeader()
        For Each col As ExcelFormatItem In rowHeader
            SetColumnValue(DataSheet, headerRow1, ColumnIndex(col.FromRange), col.Caption)
            With CType(DataSheet.Columns(String.Format("{0}:{1}", col.FromRange, col.ToRange)), Excel.Range)
                .NumberFormat = col.Format
                .ColumnWidth = col.ColWidth
                If col.HAlign <> Excel.XlHAlign.xlHAlignGeneral Then .HorizontalAlignment = col.HAlign
            End With
        Next

        For Each item In ds.OrderBy(Function(x) x.TransactionDate)
            SetColumnValue(DataSheet, rowIndex, 1, String.Format("""{0}""", item.TransactionRef),
                                                    item.clientcode,
                                                    item.currcode,
                                                    item.TransactionDate,
                                                    "",
                                                    "",
                                                    "",
                                                    item.cloccode,
                                                    "",
                                                    "",
                                                    "0",
                                                    "",
                                                    item.nitemqty,
                                                    item.ccode,
                                                    item.csize,
                                                    "END")
            rowIndex += 1
        Next

        ExcelApp.Calculation = Excel.XlCalculation.xlCalculationAutomatic
        FinializeSheet()

        SetPageThinMargin(DataSheet)
        SetFitToPage(DataSheet, 1, 0)
        With DataSheet.PageSetup
            .CenterHorizontally = False
            .CenterVertically = False
            .PrintHeadings = False
            .PrintGridlines = False
            .PrintTitleRows = "1:3"
            .PrintComments = Excel.XlPrintLocation.xlPrintNoComments
            .Orientation = Excel.XlPageOrientation.xlPortrait
            .LeftFooter = ExcelFont(8) & "Report ID: " & ReportID & vbCr & String.Format("Data as at {0:dd/MM/yyyy HH:mm:ss}", GetLastDataUpload)
            .RightFooter = ExcelFont(8) & String.Format("Page {0} of {1}" & vbCr & "Print at {2} {3}", ExcelPageNumber, ExcelTotalPage, ExcelDate, ExcelTime)
        End With
    End Sub

    Protected Overrides Sub CreateReportSheet()
        ShowMessage("正在讀取數據...")
        Dim conn As MySqlConnection = OpenConnection()
        'ds = New ExportSalesDataToSunAccountDataSource(OptionForm, {GA_DBNAME, SM_DBNAME}, conn)
        Using writer As StreamWriter = New StreamWriter("c:\\xxg0.txt")
            'writer.WriteLine("xxc " + String.Format("{0},,", item.TransactionDate))
            writer.WriteLine("xx 0 " + "ee ")
        End Using

        ds = New ExportInterComSalesDataToSunAccountDataSource(OptionForm, {GA_DBNAME, SM_DBNAME}, conn)
        TotalLoadedRows += ds.LoadReportData
        CloseConnection(conn)
        ExcelApp.ScreenUpdating = False
        GenerateReportSheet()
        ExcelApp.ScreenUpdating = True
    End Sub

    Public Sub Execute()
        OptionForm.ReportName = ReportName
        OptionForm.SelectAllBrandsOnLoad = True
        OptionForm.CustomGroupComboBox.Enabled = True
        OptionForm.CustomGroupComboBox.ResetText()
        OptionForm.CustomGroupComboBox.Items.Clear()
        OptionForm.CustomGroupComboBox.Items.AddRange({"Sales Import", "Cost Import", "Purchase Import", "InterCom Sales Import"})
        OptionForm.CustomGroupComboBox.DropDownStyle = ComboBoxStyle.DropDownList
        OptionForm.CustomGroupComboBox.SelectedIndex = 0
        OptionForm.PercentMiddleValueEntryEnabled = False
        OptionForm.ShowCompareOptionsEnabled = False
        OptionForm.DateCompareCheckBox.Checked = False
        OptionForm.YearCompareCheckBox.Checked = False
        OptionForm.WeekCompareCheckBox.Checked = False
        OptionForm.DateCompareCheckBox.Enabled = False
        OptionForm.YearCompareCheckBox.Enabled = False
        OptionForm.WeekCompareCheckBox.Enabled = False
        OptionForm.UseShortColorCheckBox.Checked = False
        OptionForm.UseShortColorCheckBox.Enabled = False
        OptionForm.DateSubGroupFromComboBox.Enabled = False
        OptionForm.YearSubGroupFromComboBox.Enabled = False
        OptionForm.WeekSubGroupFromComboBox.Enabled = False
        OptionForm.SuppressBlankColumnCheckBox.Enabled = False
        OptionForm.DateRangeButtonsEnabled = False
        OptionForm.ShowQtyCheckBox.Enabled = False
        OptionForm.ShowAmountCheckBox.Enabled = False
        OptionForm.DataSizeOptionEnabled = False
        OptionForm.DataSizeOptionVisible = False
        OptionForm.SameAdditionalFilterToAllRanges = False
        OptionForm.DataSize = SalesDataSize.ProductLevel
        OptionForm.DateFormatOptionGroupBox.Enabled = False
        OptionForm.ReportOptionGroupBox.Enabled = True
        OptionForm.FinanceMethodCheckBox.Checked = True
        OptionForm.SheetOptionGroupBox.Enabled = False
        OptionForm.IncludeAccessoriesCheckBox.Checked = True
        OptionForm.OnlyOneDate = True
        OptionForm.ShowCustomOptions = True
        OptionForm.DiscountStepEnabled = False
        OptionForm.DefaultShopLineCode = ALL_LOCATIONS_NOMOCKUP
        OptionForm.DefaultShopByLine = True
        OptionForm.SetCriteriaPage(CriteriaPage.ByYearMonth)
        OptionForm.SetSingleMonthSelection(-1)
        OptionForm.IncludeOthersCheckBox.Checked = True
        OptionForm.ShoppingBagCheckBox.Checked = True
        If OptionForm.ShowDialog() = Windows.Forms.DialogResult.OK Then
            Dim lastSheet As Excel.Worksheet = ExcelApp.ActiveSheet
            If OptionForm.PlaceOnLocationCheckBox.Checked Then lastSheet.Activate()
            GenerateReport()
        End If
    End Sub
End Class

Open in new window

I want to have specific codes to the 2 mentioned events, only when CustomGroupComboBox is having value "InterCom Sales Import". How?
0
HuaMin ChenProblem resolverAuthor Commented:
I mean specifically, to these 2 events

SetColumnValu
GenerateReportSheet
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.