Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Title On A Diagram In Excel


I want to write a text to the title of my diagram in excel (as a heading), what is the code for this?

Regneark.Charts("Diagram1").Axes(xlValue).HasTitle = True 'Here I write titles for the axis
Regneark.Charts("Diagram1").Axes(xlCategory).HasTitle = True
Regneark.Charts("Diagram1").Axes(xlValue).AxisTitle.Caption = "Time"
Regneark.Charts("Diagram1").Axes(xlCategory).AxisTitle.Caption = "Time"

'now I want title/heading for the diagram


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Excel Diagram

Does anyone have sample code to generate an organizational diagram in excel with vb?


Problem With Excel-Diagram

Having an Excel2k-X-Y-Diagram (on a seperate Sheet) I try to read the X and Y-Coordinates by pressing <CTRL>+<LeftMouse>. When I use the code below, it shows the position of the mouse in screen-coordinats but not in the correct scaling of the axes.

Has anyone an idea how to convert these units?
Thanks in advance

Private Sub Chart_MouseDown(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long)
    If (Button = 1) And (Shift = 2) Then MsgBox "X = " & X & " Y = " & Y
End Sub

Automate Visio Diagram From Excel
I am trying to automaticlly draw visio flow diagrams direct from excel
I know that Visio has an "Import Flowchart Data Wizard" but I'd like to make diagrams directly.

Does anyone have an example of directly charting from Excel?


Display An Excel Diagram In A VB Form??
Hi all,

perhaps this is a simply problem, perhaps not.
I want to display an excel diagram within a form of my VB-tool.
The creation of the diagram from array-data is my first problem. Ho do I do
this? My data is an array of points (X: a date, Y: a double value) so a
2D-diagram would be fine. How can I create a temporary xls-file and within
a diagram of this data?
The second problem is displaying this diagram within a form. What elements
should be contained in this form? How can I include the diagram to display?
I have no idea how to do this. Can anyone help?

Juri Barthel

Break Link To Excel Diagram From Word

I'm trying to write a code that can break a link to an Excel diagram from Word. I have tried several different alternatives but none have been successful.

I have an Excel workbook that is updated on a daily basis. The workbook contains several diagrams that have been copied and pasted as a linked objects into a write-protected Word-document. I have written a macro that will save the document with a new name but I also want a macro to break the link to the Excel workbook. Any ideas?

Excel Like Title Bar??
I want to know how to get Excel like Title bar??



Please Help:Need To Specify A Title In The First Row Of The Exported Excel

I have already a code to export data from a flexgrid to excel but i need to display in the first row of the exported file a text title and how can i set the exported excel file a filename and the path directory for it to be saved automatically after export!

Need this so badly cause i need to finish this system in 5 days.

Hope to hear from you soon.

Thank you!

FYI:This is the code i have when exporting.

I have this code in my module:I'll just call ExportExcel in a command button.

Public RunExport As Boolean
Public Db As Database
Public Rs As Recordset
Public Table As TableDef
Public Field As Field

Public Sub ExportExcel()
If frmmain.Grid.TextMatrix(0, 1) = vbNullString Then
MsgBox "Zero records to export", vbCritical
On Error GoTo myErr
RunExport = True
TotalRegs = frmmain.Grid.Rows
'Load frmExport
'frmExport.prBar.Min = 0
'frmExport.prBar.Max = TotalRegs
'frmExport.Show , frmmain
Dim AppExcel As Variant, myStr As String
Set AppExcel = CreateObject("Excel.application")
AppExcel.Visible = False
For r = 0 To frmmain.Grid.Rows - 1
'If RunExport Then
'myCount = myCount + 1
'frmExport.lbl.Caption = "Exporting " & myCount & " of " & TotalRegs
'frmExport.prBar.Value = myCount
For c = 0 To frmmain.Grid.Cols - 1
myStr = frmmain.Grid.TextMatrix(r, c)
AppExcel.cells(r + 2, c + 1).Formula = Trim(myStr)
Next c
'End If
Next r
'Unload frmExport
AppExcel.Visible = True
Set AppExcel = Nothing
End If
Exit Sub
If Err.Number >= 1 Then
MsgBox Err.Description, vbCritical, Err.Number
End If
End Sub

[Group] In MS Excel Title Bar...
Hi all,

This doesnt have to do wtih VBA, for that i apologize, i was not sure where else to fit this question in . I have a spreadsheet, and for some reason I cannot set the print area, I also notice that at the top title bar where it says Miscrosoft Excel - "filename" .. there is a "[Group]" next to the file name and i think thats causing the problem.. I have no idea what that is, and I thin its causing troubles in my worksheet. Even if i try and cut and paste my data, i still run into trouble.

Any help would be highgly appreciated, sorry for posting here if it needs to be moved no another section, mods go ahead and do it.


Set Title In Excel According To Combo Box Choice

I'm new to this and my query is probably quite easy for someone with VB experience...
I'd like to put title in an Excel report that is linked to my vb program. I want the title to be listed according to what option was selected from a combobox (there are a choice of 4) and can't work out the code to select the specified choice from the combo box. If anyone can help with this, that would be great. I'm using VB6 to do this.

If you can (and do) help then Thanks!

Excel Chart Axis Title
I have a chart on it own sheet named time in an excel workbook.

Does anyone know how I can change the Y axis title and the chart title using VB code..

thankyou in advanced...


Grey Title Bar Appearing In Excel
Hi All
The code attached below (RemoveBars) hides all Excel menu bars and everything and puts excel into Full Screen mode. This works fine BUT intermittently, usually when a button takes the user to another sheet, a nasty grey bar appears at the top of the screen and then stays there. It is as if the graphics are not redrawing correctly. Could be a memory allocation problem as it does vary according to PC model.

Any ideas for an easy way to stop this?
Many thanks


Sub RemoveBars()
Dim i As Integer
Dim bar As CommandBar
i = Application.CommandBars.Count
ReDim barstatus(i, 2)
i = 1
Application.ScreenUpdating = False
On Error Resume Next
For Each bar In Application.CommandBars
barstatus(i, 1) = bar.Name
barstatus(i, 2) = bar.Enabled
bar.Enabled = False
i = i + 1
Application.DisplayFullScreen = True
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
End Sub

Sub RestoreBars()
Dim i As Integer
Dim bar As CommandBar
i = Application.CommandBars.Count
i = 1
For Each bar In Application.CommandBars
bar.Enabled = True
i = i + 1
On Error Resume Next
'sometimes user machines get left with the 'RJM' command bars. Don't know why but this sw=itches them off.
Application.CommandBars("RJM_01").Visible = False
Application.CommandBars("RJM_02").Visible = False
Application.CommandBars("NonExistent").Visible = False
Application.DisplayFullScreen = False
Application.DisplayStatusBar = True
Application.DisplayFormulaBar = True
Application.DisplayFormulaBar = True ' why is this needed twice? but it is!
End Sub

Hiding Excel Main Title Bar

I have a group of senior users who do not want to use Excel for presentations because I can't get rid of the blue Excel title bar at the top of the screen.

Does anyone know of a way to hide the top title bar? It would save a lot of cutting and pasting into PowerPoint!



Listing DOcument Title In An Excel Spreadsheet

Im trying to extract word document names from a folder, and list them in an excel spreadsheet. Does anyone know some code to do this? THe code below used to do it, but it is no longer recognising "Listfilenames". Would anyone know why this is?

This is what I have so far:

Sub Listfilenames()

Workbooks("Refresh_Goldjobs.xls").Sheets("EXTRACT").Range("C6:C5000"). ClearContents

'Loop through Back1-7 directories, rolling contents to prev directory
i = 1
Pathorig = Cells(3, 2) & ""
Filename = Dir(Pathorig, vbNormal) ' Retrieve the first entry.

Do While Filename <> "" ' Start the loop.
If (GetAttr(Pathorig & Filename) And vbNormal) = vbNormal Then
Cells(i + 5, 3) = Filename
End If
i = i + 1
Filename = Dir ' Get next entry.

End Sub

Any ideas???

How Do I Change A The Title Of An Excel Chart In Word?
I have a excel chart in word - and would like to change the font,line colours and titles using VBA.

I have read that people use Chartobjects do this.
The following statement is normally used
Dim x as chartobjects, y as charts
- I get a "User type not defined" for this line.

Please help!

How Do I Select IE Option Element With No Name, Value, Or Title In An Excel Macro

I'm trying to automate webform from an Excel macro using values from Excel. I am running into a problem with a particular part that uses a Select element and several option elements that I am unsure of how to access in the macro. I know I can use the .selectedIndex property to set the option on the page but I need to be able to "read" the text display of the options into a string to compare with a value on the spreadsheet. I do not have the ability to modify the html code. I have posted the html code and the current macro code. I would be ever grateful for any assistance you all could provide.

<select size="1" name="equipmentDescription" style="position: relative; width: 357; height: 23">
<option> Item 1 </option>
<option> Item 2</option>
<option> Item 3</option>
<option> Item 4</option>


App.document.all("equipmentDescription").selectedIndex = (A # between 0 - 115)

The vba code will change the selection to the item but I need to get the text of each item to determine the number correctly because the options list changes daily.

Thanks for all your help in advance.

My Form Wasnt Showing Title Bar, But When I Added Menu Title Bar Reappeared....
I set the border to 0 and controlbox to false so that there is no title bar. Now I want to keep it that way but when I added the menus to the menu editor, the title bar reappeared although I set the menu visible to false. The menu is not showing on the top but the title bar reappeared which I dont want. I want to use the menu on right click on a treeview and therefore I cannot do without it.

Is there any way I can have the menu and no title bar? I dont want to show the menu but I will be using it on right click.

Access 2000 Exporting Report To Excel Spreadsheet, How To Add Header Or Title?
I have a button on my form in access 2000 and I am trying to figure out how to add a header of some sort or title to the top of the sheet when it gets exported to excel. I want it to show up in excel document. I have a title and stuff on the report but that doesnt get exported, just the data. How do I go about this. Im sure its just a easy click or something I am just overlooking it.

thanks much, Nick

Title: Long Loading After Exiting Page Setup In Excel 2000
The Excel document has a lot of calculations/formulas and seems to load for a long time after exiting page setup.

It does not matter if I had modified Page Setup or not, as long as I enter/exit it, it seems to load for a long time.

Can anyone provide a solution/explanation for this? thanks in advance

Help...Find First Title And Loop Its Own Lines Before Another Title In A Text File
Hello all VB Guru,

I've done as the following codes:

Open "C:Test.txt" as Input #iFile
Do While Not EOF(#iFile)
Line Input #iFile, MyString
Debug.Print My String
Close #iFile

But it will only show all lines in immediate window.

'Text file Start from Here

Category Fruit
Item-Code ABC-123
Item-Identifier ABC-123
Skey Red
Random-Price 0.80 1.00 1.50
Random-Weight 0.20 0.22 0.25
Category Vegetable
Item-Code ZEG-567
Item-Identifier ZEG-567
Skey Green
Random-Price 0.50 0.70 0.90
Random-Weight 0.30 0.42 0.56
Category Fruit
Item-Code KXT-789
Item-Identifier KXT-789
Skey Orange
Random-Price 0.70 0.90 1.00
Random-Weight 0.25 0.33 0.48

'Text File End at Here

I wonder it is possible to come out a loop that will detect the first title "Apple", get its own information from "Category" to "Random-Weight", then stop there and show in every textbox before continue to detect another title "Cucumber" with its own information that will show in every previous textbox (the loop will run over and over again until the last title)?

Thanks in advance,

How To Obtain Every Windows' Title (Topic Appear In The Blue Title Bar) ?
Is anywone know how to obtain window's Title/Topic? If I have 10 running windows, I wish to get all their Title/Topic.

Please reply as soon as possible!


Pie Diagram In VB?

Is there a function or existing code to display / draw a dynamic pie diagram on a form?


Hello friends!

When u open a Visual Basic project, u have a menu named "Diagram" . When will this menu and "Query " menu be enabled. Can anyone help me

Thanks & Regards

How do i make a line diagram?

It is just going to have one line, and seven points. And the "base" is going to be filled.


In my vb project, i have to give option to user to build a diagram likeabove depending on some criteria and allow user to save the diagram forfuture use. Pl. help me how to implement this.

thanks and regards,

Nagendra S

ER Diagram
what is mean by ER diagram? how can i draw it. pls tell with one example

Different Size For Big Title And Columns Title In DBGrid
Is't possible to put a different size for my general title and columns title in DBGRid

With HeadFont I can put a new size for my big title but the title for each columns take the same size.

How can I put size 12 for big title and size 8 for columns title.



Changing The Color Of Title Bar And The Caption Of The Title Bar

I was wondering if there is a way to change the color of the Title bar of the Visual Basic 6.0 Form, and also the color of the caption of the Title bar.


&lt;title&gt;Here Is The Title&lt;/title&gt; - How To Msgbox The Title With VB?
Can you be a little more precise about the question?

Diagram In Macro
the normal way to get the code in a mcro is to record it.

i need a special xy-diagram and i get it when i give the rows for x and y and the name in a dialog.

a part of the code is:

ActiveChart.SeriesCollection(1).XValues = "=Eingabe! R15C3:R28C3"
ActiveChart.SeriesCollection(1).Values = "=Eingabe!R15C1:R28C1"
ActiveChart.SeriesCollection(1).Name = "=Eingabe!R14C3"

but when i start the macro, there is are errors for

xvalues, values and name

it's microsofts own code!

can somebody help me?

VB App && UML Class Diagram
I am creating a web based application using ASP. I am writing the Data Layer and Buisness Layer in visual basic. I am trying to plan the classes using a UML Class Diagram. I am having real trouble though. Most of the functions the business layer will perform are simple read/writes to the database, there are hardly any associations/generalizations that I can see on the class diagram. Is this normal to have a set of objects that only exist on their own? If so do I just define the attributes and operations for each class and place them on the diagram without any associtations etc?
Also how do I determine the classes, should I have a class for each functional area? For example I need to track jobs that engineers are working on and what equipment they have used. Do I have one class that handles the job functionality and one for the equipment?
Any thoughts

How To Display A Diagram?
I want to display a circel diagram in my app, but i don't know how to. Does anybody know about any control i can use ?

Thanks in advance,

Diagram Storing
hi, I have to develop an application which has to store mathematical problems with diagrams. The database I have to use is Access.

please tell me how to go about it.

Circuit Diagram
This is not a vb question, but, does anyone know of where i can get a circuit diagram of a mouse (any mouse) for a computer for my technology project ?

Diagram In A Form
I have a form with a diagram in it. When I start the program and make the form smaller, the diagram stays the same size. Is there any code to make the diagram get smaller with the form, so you can still see all of the diagram.

Tree Diagram
Do you know of any efficient code that works like a tree diagram; given several strings, it could work out every possible combination?


VB App && UML Class Diagram
I am creating a web based application using ASP. I am writing the Data Layer and Buisness Layer in visual basic. I am trying to plan the classes using a UML Class Diagram. I am having real trouble though. Most of the functions the business layer will perform are simple read/writes to the database, there are hardly any associations/generalizations that I can see on the class diagram. Is this normal to have a set of objects that only exist on their own? If so do I just define the attributes and operations for each class and place them on the diagram without any associtations etc?
Also how do I determine the classes, should I have a class for each functional area? For example I need to track jobs that engineers are working on and what equipment they have used. Do I have one class that handles the job functionality and one for the equipment?
Any thoughts

3D Surface Diagram

      I'm trying to create a nice 3D surface diagram from an array of numbers. I had a try with Mschart which is nice and easy to use but it doesnt seem to allow this kind of graph. I know it can be done using msgraph but i cant find a good tutorial explaining from begining to end how to do it.

I have attached a picture of the style of graph i'm looking for,

Thanks for any help

E-R Diagram Print??
I want to print an E-R diagram in crystal reports. Can i do that..if yes how...Please reply back..I am in urgent need...thanks in advance..

Database Diagram
I've read about creating Database Diagrams. Can this be done from within VB? If so, do you have to have Enterprise? I have VB Professional.

Thanks for your input.

Printing Diagram
Could anyone tell me, how can i print diagram from a visual basic program??

Diagram Printing
Can anyone please tell me how i can print diagram from a visual basic program?

What Is State Transition Diagram
hello every body can you help me please with the State transition diagram

Creating A Phasor Diagram
I hope this is the correct forum to post this question.

Is it possible to create a chart that is in the form of a phasor diagram? Basically, it would just be a circle graph with arrows extending from the origin at angles obtained from data in the spreadsheet.

Also, if this is possible, can this chart be placed into a userform?

Thanks for any help,


Diagram And Query Menus
I have noticed that in all of the time that I have been programming - I have never used either the Query or Diagram menus - infact they are always grayed out - Has anyone ever used these menus - how and why are they used??


Instant Messenger Diagram
In the simplest form isn't this the way you keep track of Buddies' IP's and how they are notified that a Buddy comes online?


Using More Pages For Printing A Diagram

I want to print a poulediagram diagram, but sometimes it's to big for one page (A4) . I might need 4 pages, but in the end the pages are a kind of puzzle in a square. (see for a picture of an example the enclosured attatchement)

Is there a simple way to solve this problem?

Process Diagram For An Application
I need to prepare the Workflow/Process Diagram of the application built in Visual Basic 6.0

I wanted to know if there are any tools which can automate the process of generating the process flow Diagram

Can some recommend some tool?

Copyright 2005-08, All rights reserved