Newbie, struggling with ROADMAP example, MsgBox "No Data to Process"

22 views
Skip to first unread message

Jason Turner

unread,
Oct 10, 2013, 9:02:57 AM10/10/13
to excel-r...@googlegroups.com
I have followed your example to the letter:

Created a worksheet named "InputData" and entered the appropriate data

Activate Deactivate Description ID Target
5-Jan-10 20-Mar-12 Roller Skates Skates Vespa
2-Apr-10 20-Mar-12 Bike Bike Vespa
20-Mar-12 6-Nov-12 Motor Scooter Vespa Harley
6-Nov-12 2-Sep-13 Motor Bike Harley Smart
2-Sep-13 21-Mar-14 Smart Car Smart 4x4
28-Oct-10 11-Dec-13 Truck Ram 4x4
11-Dec-13 SUV:4x4 4x4 Plan
1-Jan-10 28-Oct-10 Whellbarrow Barrow Ram
12-Dec-09 Transport Plan Plan
7-Aug-12 5-Nov-12 Money buyBike harley

Inserted a module named roadmap with the appropriate code

Public Sub RoadMapper()
    Dim dSet As cDataSet
    
    Set dSet = New cDataSet
    ' just need to provide the range where data headings are
    With dSet
        .populateData Range("InputData!$a$1:$e$1")
        
        If .where Is Nothing Then
            MsgBox ("No data to process")
        Else
            ' check we have fields we need
            If .headingRow.validate(True, "Activate", "Deactivate", "ID", "Target", "Description") Then
                Call doTheMap(dSet)
            End If
        End If
    End With

End Sub

When I run the RoadMapper procedure I always get the "No data to process" MsgBox

-Jason-

Bruce Mcpherson

unread,
Oct 10, 2013, 9:35:19 AM10/10/13
to excel-r...@googlegroups.com
ah yes .. you are looking at the evolution of the development of that roadmapper, and the description applies to a very early version, as described in the notes- i need to make that clearer. 

It's now been incorporated into cDataset.xlsm, and there are many more options now, as described here


it's best to use the example in the latest cDataSet.xlsm - the inputdata tab. You can just play with the data there

for interest, the code nowadays looks like this, and can be found in the doRoadmapper tab.

Public Sub roadmapper()
    actRoadMapper ("RoadmapParameters")
End Sub

Public Sub actRoadMapper(Optional wp As String = "Parameters")
    Dim dSets As cDataSets, respectFilter As Boolean, useData As String

    Dim rData As Range, rParam As Range, rplot As Range
    ' where the parameters are
    Set rParam = rangeExists(wp).Worksheet.UsedRange
    ' automatically find where the data is
    Set rData = getLikelyColumnRange
    ' get the data and the parameters
    Set dSets = New cDataSets
    
    With dSets
        .create
        With .init(rParam, , , True, "options")
            respectFilter = .isCellTrue("respect filter", "value")
        End With
        .init rData, , "data", , , , , respectFilter
        .init rParam, , , True, "roadmap colors"
        .init rParam, , , True, "containers"

        .init rParam, , , True, "custom bars"
    End With

    With dSets.dataSet("data")
        If .where Is Nothing Then
            MsgBox ("No data to process")
        Else
            ' check we have fields we need
            If .headingRow.validate(True, "Activate", "Deactivate", "ID", "Target", "Description") Then
            ' where to plot
                Set rplot = rangeExists(dSets.dataSet("options").cell("frameplot", "value").toString)
                If Not rplot Is Nothing Then
                    Call doTheMap(dSets, rplot)
                End If
            End If
        End If
    End With

End Sub

--
You received this message because you are subscribed to the Google Groups "Excel Liberation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excel-ramblin...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Bill Foote

unread,
Oct 10, 2013, 12:50:58 PM10/10/13
to excel-r...@googlegroups.com
Hi Jason, perhaps change row reference from $e$1 to $e$last row number in the range for your excel data set?
Bill


Bill Foote
--

Bruce Mcpherson

unread,
Oct 10, 2013, 1:01:40 PM10/10/13
to excel-r...@googlegroups.com
Bill

actually that example probably wont work with the newer versions of the roadmapper - as per my last update. There's now no need to specify a specifc range - it will figure it out

bruce

Bill Foote

unread,
Oct 10, 2013, 1:45:45 PM10/10/13
to excel-r...@googlegroups.com, excel-r...@googlegroups.com
Great. Much thanks. Bill

Message has been deleted

Jason Turner

unread,
Oct 11, 2013, 11:13:08 PM10/11/13
to excel-r...@googlegroups.com
Thank you all very much for the quick reply. I found that in the code I posted above. If I input the address of the entire InputData Range the code worked just fine

Thanks again everyone

-Jason-
Reply all
Reply to author
Forward
0 new messages