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

Hey all. I have just started to tinker with VB and have
next to no idea on how to code correctly. I want to open
a worksheet and sorta code code like this:
Private Sub CommandButton1_Click()
Open_Worksheet.Glider_1
End Sub
Stop laughing! Can some one point me in the right
direction so it will open Sheet1 (Glider 1)? Thanx in
advance
Macr
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default VB numpty

:-)

Private Sub CommandButton1_Click()
Worksheets("Glider_1").Activate
End Sub

best,
RADO


"Macr" wrote in message
...
Hey all. I have just started to tinker with VB and have
next to no idea on how to code correctly. I want to open
a worksheet and sorta code code like this:
Private Sub CommandButton1_Click()
Open_Worksheet.Glider_1
End Sub
Stop laughing! Can some one point me in the right
direction so it will open Sheet1 (Glider 1)? Thanx in
advance
Macr



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default VB numpty

Hi Macr, :-)

I do not laugh! Everybody didn't know when they were a novice.

May I ask do you want to SELECT a Worksheet? or want to Open a WorkBook?

Assume the Worksheet name is Worksheet.Glider, the code would be like this.

'-----------------------------------------------------------
Private Sub CommandButton1_Click()
'Select a Worksheet
Worksheets("Worksheet.Glider").Select
End Sub
'-----------------------------------------------------------

Assume the Workbook name is Worksheet.Glider.xls.
Use correct full path instead of "C:\Worksheet.Glider.xls"
'-----------------------------------------------------------
Private Sub CommandButton1_Click()
'Open a Workbook
Workbooks.Open ("C:\Worksheet.Glider.xls")
End Sub
'-----------------------------------------------------------


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/...astersLink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

"Macr" wrote in message
...
Hey all. I have just started to tinker with VB and have
next to no idea on how to code correctly. I want to open
a worksheet and sorta code code like this:
Private Sub CommandButton1_Click()
Open_Worksheet.Glider_1
End Sub
Stop laughing! Can some one point me in the right
direction so it will open Sheet1 (Glider 1)? Thanx in
advance
Macr


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

Subscript out of range (Error 9)
Have I done something wrong RADO?

-----Original Message-----
:-)

Private Sub CommandButton1_Click()
Worksheets("Glider_1").Activate
End Sub

best,
RADO


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

Fixed it RADO. Thanx for your help. I made an error
concerning spaces and underscores. I assumed that VB
would not understand a space and added an underscore. It
should look like this
Private Sub CommandButton1_Click()
Worksheets("Glider 1").Activate
End Sub

-----Original Message-----
:-)

Private Sub CommandButton1_Click()
Worksheets("Glider_1").Activate
End Sub

best,
RADO


"Macr" wrote in message
...
Hey all. I have just started to tinker with VB and have
next to no idea on how to code correctly. I want to

open
a worksheet and sorta code code like this:
Private Sub CommandButton1_Click()
Open_Worksheet.Glider_1
End Sub
Stop laughing! Can some one point me in the right
direction so it will open Sheet1 (Glider 1)? Thanx in
advance
Macr



.



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

Rado answered my question. I want to make an index page,
so I can access 8 other pages and that was one. Now I
need to find out how to print the work book, save the
workbook and exit the workbook and I will be cruising.
Thanx for your interest and attempt to help. It is
appreciated.
Does anyone know of a page that would help me with the
above code, so I don't drive you guys insane?
-----Original Message-----
Hi Macr, :-)

I do not laugh! Everybody didn't know when they were a

novice.

May I ask do you want to SELECT a Worksheet? or want to

Open a WorkBook?

Assume the Worksheet name is Worksheet.Glider, the code

would be like this.

'--------------------------------------------------------

---
Private Sub CommandButton1_Click()
'Select a Worksheet
Worksheets("Worksheet.Glider").Select
End Sub
'--------------------------------------------------------

---

Assume the Workbook name is Worksheet.Glider.xls.
Use correct full path instead

of "C:\Worksheet.Glider.xls"
'--------------------------------------------------------

---
Private Sub CommandButton1_Click()
'Open a Workbook
Workbooks.Open ("C:\Worksheet.Glider.xls")
End Sub
'--------------------------------------------------------

---


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:http://www.interq.or.jp/sun/puremis/colo/CellMastersL

ink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

_/_/_/

"Macr" wrote in message
...
Hey all. I have just started to tinker with VB and have
next to no idea on how to code correctly. I want to

open
a worksheet and sorta code code like this:
Private Sub CommandButton1_Click()
Open_Worksheet.Glider_1
End Sub
Stop laughing! Can some one point me in the right
direction so it will open Sheet1 (Glider 1)? Thanx in
advance
Macr


.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default VB numpty

If I understand you, you want to goto a selected sheet. If you
right click on the sheet tabview codecopy/paste thisSave workbooktype in
the name of the sheet somewhere. Double click on that cell to goto the sheet
desired.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Dim mysheet As String
mysheet = Trim(ActiveCell.Value)
On Error GoTo no
Sheets(mysheet).Select
Exit Sub
no: MsgBox "No Sheet"
End Sub
===
To print workbook
activeworkbook.printout
To save
This workbook.save
=
Here is a sub I use to save all open workbooks and leave excel
Sub CLOSE_ALL()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
For Each w In Workbooks
w.Save
Next
Application.Quit
End Sub

--
Don Guillett
SalesAid Software

"macr" wrote in message
...
Rado answered my question. I want to make an index page,
so I can access 8 other pages and that was one. Now I
need to find out how to print the work book, save the
workbook and exit the workbook and I will be cruising.
Thanx for your interest and attempt to help. It is
appreciated.
Does anyone know of a page that would help me with the
above code, so I don't drive you guys insane?
-----Original Message-----
Hi Macr, :-)

I do not laugh! Everybody didn't know when they were a

novice.

May I ask do you want to SELECT a Worksheet? or want to

Open a WorkBook?

Assume the Worksheet name is Worksheet.Glider, the code

would be like this.

'--------------------------------------------------------

---
Private Sub CommandButton1_Click()
'Select a Worksheet
Worksheets("Worksheet.Glider").Select
End Sub
'--------------------------------------------------------

---

Assume the Workbook name is Worksheet.Glider.xls.
Use correct full path instead

of "C:\Worksheet.Glider.xls"
'--------------------------------------------------------

---
Private Sub CommandButton1_Click()
'Open a Workbook
Workbooks.Open ("C:\Worksheet.Glider.xls")
End Sub
'--------------------------------------------------------

---


--
Kind Regards
Colo
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

_/_/_/
Colo of 'The Road of The Cell Masters' :)

URL:
http://www.interq.or.jp/sun/puremis/colo/CellMastersL
ink.htm


/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

_/_/_/

"Macr" wrote in message
...
Hey all. I have just started to tinker with VB and have
next to no idea on how to code correctly. I want to

open
a worksheet and sorta code code like this:
Private Sub CommandButton1_Click()
Open_Worksheet.Glider_1
End Sub
Stop laughing! Can some one point me in the right
direction so it will open Sheet1 (Glider 1)? Thanx in
advance
Macr


.



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
Numpty MS Query Install Question TheScullster New Users to Excel 3 May 11th 06 11:00 AM


All times are GMT +1. The time now is 02:14 AM.

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

About Us

"It's about Microsoft Excel"