#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB beginner

My name is Matthew Balch.

I have extensive use of data and excel. Due to the nature of work I am
currently undertaking I need to learn VB.

I am at struggling with the help files and examples. I think I find the
answer, try it, only for an error to appear.



I have two very basic queries which I cant seem to solve using the help
files:-



1) Create a new command button on auto_open?



2) Display a form



Obviously the basics!

Could someone possibly help? And or, point me in the right direction to
lookup this information and a guide for absolute beginners like me!



Cheers

Matt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default VB beginner

Microsoft 2003, VB 6.3

"Matthew Balch" wrote:

My name is Matthew Balch.

I have extensive use of data and excel. Due to the nature of work I am
currently undertaking I need to learn VB.

I am at struggling with the help files and examples. I think I find the
answer, try it, only for an error to appear.



I have two very basic queries which I cant seem to solve using the help
files:-



1) Create a new command button on auto_open?



2) Display a form



Obviously the basics!

Could someone possibly help? And or, point me in the right direction to
lookup this information and a guide for absolute beginners like me!



Cheers

Matt

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default VB beginner

Thanks for the reply Bob,

On both of the queries I can get the vb to work on new spreadsheets. But
when I copy it across to the spreadsheet I want them in the vb coding is no
longer recognising the variants.

do you know what has happened?

1)
On workbook_open I would like a menu created with just a couple of buttons
to which I can assign macros:-

This is what Ive got on a separate workbook (copied from somewhere) which
works fine (although not linked to any macros as Ive not worked out how to do
that yet!)

Public Sub CreateCommandBarWithControls()

' Purpose: Creates a sample command bar with a number
' of controls.

Dim objCommandBar As Office.CommandBar
Dim objCommandBarControl As Office.CommandBarControl
Dim objCommandBarButton As Office.CommandBarButton
Dim objCommandBarComboBox As Office.CommandBarComboBox
Dim objCommandBarPopup As Office.CommandBarPopup

For Each objCommandBar In Application.CommandBars

If objCommandBar.Name = "Top Bud" Then

objCommandBar.Delete

End If

Next objCommandBar

Set objCommandBar = Application.CommandBars.Add _
("Top Bud")

With objCommandBar.Controls


Set objCommandBarComboBox = .Add(msoControlDropdown)

With objCommandBarComboBox

.AddItem "Index"
.AddItem "Check Sheet"
.AddItem "Summary"
.Style = msoComboLabel
.Caption = "Sheet Selection"

End With

Set objCommandBarButton = .Add(msoControlButton)

With objCommandBarButton

.Caption = "Refresh Data"
.Style = msoButtonIconAndCaption
.TooltipText = _
"Press to restablish links and refresh data."

End With

Set objCommandBarButton = .Add(msoControlButton)

With objCommandBarButton

.Caption = "Generate Trading Accounts"
.Style = msoButtonIconAndCaption

End With


End With

objCommandBar.Visible = True

End Sub

re 2)
I dont understand at all.

Very simple I know but it doesn't seem to work!





"Bob Phillips" wrote:




"Matthew Balch" <Matthew wrote in message
...
My name is Matthew Balch.

I have extensive use of data and excel. Due to the nature of work I am
currently undertaking I need to learn VB.

I am at struggling with the help files and examples. I think I find the
answer, try it, only for an error to appear.



I have two very basic queries which I cant seem to solve using the help
files:-



1) Create a new command button on auto_open?



Why would you create it on open. That would mean you create a new one every
open.

2) Display a form


Userform1.Show



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default VB beginner

Further more my project (small one?!) is to create a budgeting spreadsheet.
This entails creating something in excel which replicates the way a database
interfaces.
Obviously I am starting at the very beginning and looks like a very ominious
task given my ability (lack of) to find the answers.

Overall I am preparing a budget for journals that has lots of different
variables and users.

I would like a data input intereface separated by user (which select from a
drop down menu). ie an Editor. This then selects all the relevant titles, and
variables that go with that, each title will have 30 + different price
variables. These price variables are made up of four fields. Then I want the
user to be able to enter budgetd Nos (target sales) and the price being
looked up from a seperate database list - a list included within the same
workbook. I would like the user to able amend what has been input etc.

Also would like fast searches using a title search etc.

From the numbers and prices in the data sheet I then need to populate values.
I have different regions and different exchange rates.

......lots more to it but thats just a basic overview.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help a beginner.... Lindsey Excel Programming 2 November 25th 05 04:11 PM
beginner question Roshintosh Excel Programming 2 November 9th 05 02:11 AM
macro beginner Rowan[_2_] Excel Programming 0 July 29th 05 02:38 AM
Beginner at VBA Bob Simon Excel Programming 5 December 4th 04 03:31 PM
macro help for a beginner Danz[_4_] Excel Programming 2 November 15th 04 07:19 PM


All times are GMT +1. The time now is 04:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"