#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default Function or VBA

Hi,

Our company has a "Contract Review" form made up of 5 sheets. There are
certain situations when we will want 2 of the sheets to be included in our
quotation package to the customer. These 2 sheets contain the specifications
the RFQ was generated to.

My thought is to put a button on the individual sheets in the Contract
Review form. This will enable the estimator to click the button and insert
the sheets into the "Quotation" form.

Will this be easier to do via FUNCTIONS or VBA?

I am currently taking myself through Excel Programming Weekend Crash Cousre.
My experience with programming VBA is novice at best. I've written programs
for PLC's using ladder logic and also statement list. Just wondering, the
learning curve for VBA seems like it might be a while before I can accomplish
what I want to do with this.

--
TIA

AFJr
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 229
Default Function or VBA

Following assumptions:
* You are running a single instance of Excel (usually this is the
case)
* Your Quotations workbook is in a file called Quotations.xls
* You want the Active Sheet to be copied after the first worksheet in
Quotations.xls

The following sub, when assigned to your command button, will copy the
active sheet (on which the button is located, presumably) will be
copied. If Quotations.xls is not open, an error message is displayed.

Private Sub Button1_Click()
Dim wsh As Excel.Worksheet

Set wsh = Application.ActiveSheet

On Error Resume Next
wsh.Copy
After:=Application.Workbooks("Quotations.xls").Wor ksheets(1)
If Err.Number < 0 Then
Call MsgBox("Error copying worksheet")
End If
On Error Goto 0
End Sub


On Dec 3, 2:42 pm, AFJr wrote:
Hi,

Our company has a "Contract Review" form made up of 5 sheets. There are
certain situations when we will want 2 of the sheets to be included in our
quotation package to the customer. These 2 sheets contain the specifications
the RFQ was generated to.

My thought is to put a button on the individual sheets in the Contract
Review form. This will enable the estimator to click the button and insert
the sheets into the "Quotation" form.

Will this be easier to do via FUNCTIONS or VBA?

I am currently taking myself through Excel Programming Weekend Crash Cousre.
My experience with programming VBA is novice at best. I've written programs
for PLC's using ladder logic and also statement list. Just wondering, the
learning curve for VBA seems like it might be a while before I can accomplish
what I want to do with this.

--
TIA

AFJr


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 229
Default Function or VBA

Additionally, if you want the button to not be in your quotations
worksheet, and assuming there's only one button on it, you can use
this code:

Application.Workbooks("Quotations.xls").Worksheets (wsh.Name).Buttons(1).Delete


On Dec 3, 3:52 pm, iliace wrote:
Following assumptions:
* You are running a single instance of Excel (usually this is the
case)
* Your Quotations workbook is in a file called Quotations.xls
* You want the Active Sheet to be copied after the first worksheet in
Quotations.xls

The following sub, when assigned to your command button, will copy the
active sheet (on which the button is located, presumably) will be
copied. If Quotations.xls is not open, an error message is displayed.

Private Sub Button1_Click()
Dim wsh As Excel.Worksheet

Set wsh = Application.ActiveSheet

On Error Resume Next
wsh.Copy
After:=Application.Workbooks("Quotations.xls").Wor ksheets(1)
If Err.Number < 0 Then
Call MsgBox("Error copying worksheet")
End If
On Error Goto 0
End Sub

On Dec 3, 2:42 pm, AFJr wrote:



Hi,


Our company has a "Contract Review" form made up of 5 sheets. There are
certain situations when we will want 2 of the sheets to be included in our
quotation package to the customer. These 2 sheets contain the specifications
the RFQ was generated to.


My thought is to put a button on the individual sheets in the Contract
Review form. This will enable the estimator to click the button and insert
the sheets into the "Quotation" form.


Will this be easier to do via FUNCTIONS or VBA?


I am currently taking myself through Excel Programming Weekend Crash Cousre.
My experience with programming VBA is novice at best. I've written programs
for PLC's using ladder logic and also statement list. Just wondering, the
learning curve for VBA seems like it might be a while before I can accomplish
what I want to do with this.


--
TIA


AFJr- Hide quoted text -


- Show quoted text -


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
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


All times are GMT +1. The time now is 09:35 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"