Welcome Guest!
 VB 6 Helper
 Previous Message All Messages Next Message 
VB 6 Helper Newsletter  Rod Stephens
 May 23, 2009 07:35 PDT 

Does anyone know what happened to Neil Crosby? I haven't heard from him
in a while. Are you out there Neil?
----------
New review of "Beginning Database Design Solutions":

    http://www.denvervisualstudio.net/Reviews/Books2009/Book04272009.htm
----------
Have a great week and thanks for subscribing!

Rod
RodSte-@vb-helper.com

Books To Keep: http://www.BooksToKeep.com
----------
*** Now Available ***

Beginning Database Design Solutions
http://www.amazon.com/exec/obidos/ASIN/0470385499/vbhelper/

Visual Basic 2008 Programmer's Reference
http://www.amazon.com/exec/obidos/ASIN/0470182628/vbhelper/
==========

    Both Contents:
1. New HowTo: Use code to make a chart in Excel from the current
selection in VBA
2. New Links
3. A Different Kind of Review
4. New Article
==========
++++++++++
<Both>
++++++++++
==========
1. New HowTo: Use code to make a chart in Excel from the current
selection in VBA
http://www.vb-helper.com/howto_vba_excel_chart_from_selection.html
http://www.vb-helper.com/HowTo/howto_vba_excel_chart_from_selection.zip

The MakeGraph subroutine takes as a parameter a Range to use to build
the chart. You can pass it the Selection object to use the currently
selected values.

The subroutine creates a new worksheet and adds a chart to it. It adds
any labels that is was passed as parameters and then sizes the chart.

Public Sub MakeGraph(value_range As Range, Optional ByVal title As
String = "", Optional ByVal x_label As String = "", Optional ByVal
y_label As String = "")
Dim work_book As Workbook
Dim last_sheet As Worksheet
Dim new_sheet As Worksheet
Dim r As Integer
Dim new_chart As Chart
Dim chart_shape As Shape

    ' Make a new worksheet.
    Set work_book = Application.ActiveWorkbook
    Set last_sheet = work_book.Sheets(work_book.Sheets.Count)
    Set new_sheet = work_book.Sheets.Add(after:=last_sheet)
    new_sheet.Name = "New Chart"

    ' Make the chart.
    Set new_chart = Charts.Add()
    ActiveChart.ChartType = xlLineMarkers
    ActiveChart.SetSourceData _
        Source:=value_range, _
        PlotBy:=xlColumns
    ActiveChart.Location Where:=xlLocationAsObject, Name:="New Chart"

    ' Set the chart's title abd axis labels.
    With ActiveChart
        If Len(title) = 0 Then
            .HasTitle = False
        Else
            .HasTitle = True
            .ChartTitle.Characters.Text = title
        End If

        If Len(x_label) = 0 Then
            .Axes(xlCategory, xlPrimary).HasTitle = False
        Else
            .Axes(xlCategory, xlPrimary).HasTitle = True
            .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text =
x_label
        End If

        If Len(y_label) = 0 Then
            .Axes(xlValue, xlPrimary).HasTitle = False
        Else
            .Axes(xlValue, xlPrimary).HasTitle = True
            .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text =
y_label
        End If
    End With

    ' Make it bigger.
    Set chart_shape = new_sheet.Shapes(new_sheet.Shapes.Count)
    With chart_shape
        .ScaleWidth 1.9, msoFalse, msoScaleFromBottomRight
        .ScaleHeight 1.9, msoFalse, msoScaleFromBottomRight
        .Left = 20
        .Top = 20
    End With
End Sub
==========
2. New Links
http://www.vb-helper.com/links.htm

CareerJet.com
http://www.careerjet.com
U.S. job search engine. Seems to aggregate from a bunch of other job
sites.
==========
3. A Different Kind of Review

The Denver Visual Studio Users's Group is quite active in posting
reviews. Publishers give them free books and they review them. The
reviews are a bit more in-depth than what you often see on Amazon,
Barnes and Noble, and other online booksellers.

Here's the one for my book "Beginning Database Design Solutions":

    http://www.denvervisualstudio.net/Reviews/Books2009/Book04272009.htm

Recently they posted one about John Mueller's book "LINQ for Dummies"
at:

    http://www.denvervisualstudio.net/Reviews/Books2009/Book05102009.htm

They have lots of other reviews, too, (including a few about my books)
at:

    http://www.denvervisualstudio.net/Reviews.htm

If you want more detailed reviews, take a look at a few.
==========
4. New Article

DevX: WPF Wonders: An Alphabetical Compendium of WPF Controls
http://www.devx.com/dotnet/Article/41560
April 29, 2009

Among many other changes, WPF brings a completely new set of controls.
Learn which controls do what and pick up a few tips on getting the most
out of them in your WPF applications.

This article summarizes the most useful WPF controls. Some will be
familiar friends (TextBox, Label, Button) but others will be new
acquaintances (StackPanel, BulletDecorator, DocumentViewer).
==========
Archives:
    http://www.topica.com/lists/VBHelper
    http://www.topica.com/lists/VB6Helper
    http://www.topica.com/lists/VBNetHelper

Post questions at:
    http://www.topica.com/lists/VBHelperQA
	
 Previous Message All Messages Next Message 
  Check It Out!

  Topica Channels
 Best of Topica
 Art & Design
 Books, Movies & TV
 Developers
 Food & Drink
 Health & Fitness
 Internet
 Music
 News & Information
 Personal Finance
 Personal Technology
 Small Business
 Software
 Sports
 Travel & Leisure
 Women & Family

  Start Your Own List!
Email lists are great for debating issues or publishing your views.
Start a List Today!

© 2001 Topica Inc. TFMB
Concerned about privacy? Topica is TrustE certified.
See our Privacy Policy.