RE: $$Excel-Macros$$ Macro that sends email with an attachment of current excel doc in lotus - Help!

2011-12-22 Thread Asa Rossoff
I don't know much about Lotus Notes or automating it, but you don't Set
Session to anything.  You'll need to do that before your Set Maildb (first
command) line.

Asa

-Original Message-
From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of NJIBA
Sent: Thursday, December 22, 2011 1:22 PM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ Macro that sends email with an attachment of
current excel doc in lotus - Help!


So I used the VB below and I fell in an abyss. I know it's not working
because I do not get an email but I dont get an error message either.
Any suggestion will be welcome.





Dim Maildb As Object
Dim MailDoc As Object
Dim Body As Object
Dim Session As Object

'Open the Mail Database of your Lotus Notes
Set Maildb = Session.GETDATABASE("", "C:\Documents and Settings
\USER ID\My Documents\Notes\bookmark.nsf")
If Not Maildb.IsOpen = True Then Call Maildb.Open
'Create the Mail Document
Set MailDoc = Maildb.CREATEDOCUMENT
Call MailDoc.REPLACEITEMVALUE("Form", "New Message")
'Set the Recipient of the mail
Call MailDoc.REPLACEITEMVALUE("SendTo",
"jtmv...@comerica.com")
'Set subject of the mail
Call MailDoc.REPLACEITEMVALUE("Subject", "ORE Entry")
'Create and set the Body content of the mail
Set Body = MailDoc.CREATERICHTEXTITEM("Body")
Call Body.APPENDTEXT("Body text here")
'Example to create an attachment (optional)
Call Body.ADDNEWLINE(2)
Call Body.EMBEDOBJECT(1454, "", "C:\Documents and Settings
\USER ID\Desktop\ORE Improvements\NAME OF FILE.xlsm", "Attachment")
'Example to save the message (optional) in Sent items
MailDoc.SAVEMESSAGEONSEND = True
'Send the document
'Gets the mail to appear in the Sent items folder
Call MailDoc.REPLACEITEMVALUE("PostedDate", Now())
Call MailDoc.SEND(False)
'Clean Up the Object variables - Recover memory
Set Maildb = Nothing
Set MailDoc = Nothing
Set Body = Nothing
Set Session = Nothing
Exit Sub

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security
measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.


--
To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ List all Excel Workbooks

2011-12-22 Thread Cab Boose
Hi

After about 3 minutes (30Gig on hardrives) it came up with:
 Run-time error '-2144010224 (803500 10)':
Method 'Execute' of object 'FileSearch' failed

Your comments would be appreciated.

Thanks

Charlie Harris














On Fri, Dec 23, 2011 at 5:28 PM, siti Vi  wrote:

> Hi Charlie,
> Please check and try this code, if it helps...
>
> '---standard Module-
> Sub *GenerateList*()
>' sitiVi / jakarta 23 Dec 2011
>' in answering:
>' http://groups.google.com/group/ _
>' excel-macros/browse_thread/thread/9dbda650f1d09d65#
>'
>Dim ArDir As Variant, iDir As Integer
>' please edit this list of Path..
>ArDir = Array(*"C:\MyData", "F\", "E:\", "D\xFolder\yFolder"*)
>' ~~
>Application.Calculation = xlCalculationManual
>Application.ScreenUpdating = False
>For iDir = LBound(ArDir) To UBound(ArDir)
>   Call ListFiles(ArDir(iDir))
>Next iDir
>Columns("A:B").EntireColumn.AutoFit
>Application.ScreenUpdating = True
>Application.Calculation = xlCalculationAutomatic
> End Sub
>
> Private Sub *ListFiles*(ByVal SpecifiedDir As String)
>' sitiVi / jakarta 23 Dec 2011
>' in answering:
>' http://groups.google.com/group/ _
>' excel-macros/browse_thread/thread/9dbda650f1d09d65#
>'
>Dim vFName As Variant, RowN As Long
>RowN = Cells(1).CurrentRegion.Rows.Count
>If RowN = 1 Then RowN = 0
>With Application.FileSearch
>   .NewSearch
>   .LookIn = SpecifiedDir
>   .SearchSubFolders = True
>   .FileType = msoFileTypeExcelWorkbooks
>   REM .Execute
>   If .Execute > 0 Then
>  For Each vFName In .FoundFiles
> RowN = RowN + 1
> ActiveSheet.Cells(RowN, 1).Value = SpecifiedDir
> ActiveSheet.Cells(RowN, 2).Value = vFName
>  Next
>   End If
>End With
> End Sub
> '--end of code -
>
> Looking forward to hear if this code works (or not)..
>
> Thx, Best regards & Wassalamualaikum wr wb.
> siti Vi
>
>
>
> On Fri, Dec 23, 2011 at 4:45 AM, Cab Boose  wrote:
> >
> > Hi
> > There are plenty of solutions for listing open excel files.
> > I would like to list all excel workbooks on my C:  and F: drives.   They
> are all over the place. My bad housekeeping!
> > How do I get the complete address for each workbook ?   either with a
> hyperlink or not.  But do need to print out the list.
> > Using Excel 2000 at the moment but soon hopefully to upgrade to 2003
> > Thanks & Merry Christmas to all
> >
> > regards
> > Charlie
>
>  --
> FORUM RULES (934+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5) Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> --
> To post to this group, send email to excel-macros@googlegroups.com
>

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


$$Excel-Macros$$ Macro that sends email with an attachment of current excel doc in lotus - Help!

2011-12-22 Thread NJIBA

So I used the VB below and I fell in an abyss. I know it's not working
because I do not get an email but I dont get an error message either.
Any suggestion will be welcome.





Dim Maildb As Object
Dim MailDoc As Object
Dim Body As Object
Dim Session As Object

'Open the Mail Database of your Lotus Notes
Set Maildb = Session.GETDATABASE("", "C:\Documents and Settings
\USER ID\My Documents\Notes\bookmark.nsf")
If Not Maildb.IsOpen = True Then Call Maildb.Open
'Create the Mail Document
Set MailDoc = Maildb.CREATEDOCUMENT
Call MailDoc.REPLACEITEMVALUE("Form", "New Message")
'Set the Recipient of the mail
Call MailDoc.REPLACEITEMVALUE("SendTo",
"jtmv...@comerica.com")
'Set subject of the mail
Call MailDoc.REPLACEITEMVALUE("Subject", "ORE Entry")
'Create and set the Body content of the mail
Set Body = MailDoc.CREATERICHTEXTITEM("Body")
Call Body.APPENDTEXT("Body text here")
'Example to create an attachment (optional)
Call Body.ADDNEWLINE(2)
Call Body.EMBEDOBJECT(1454, "", "C:\Documents and Settings
\USER ID\Desktop\ORE Improvements\NAME OF FILE.xlsm", "Attachment")
'Example to save the message (optional) in Sent items
MailDoc.SAVEMESSAGEONSEND = True
'Send the document
'Gets the mail to appear in the Sent items folder
Call MailDoc.REPLACEITEMVALUE("PostedDate", Now())
Call MailDoc.SEND(False)
'Clean Up the Object variables - Recover memory
Set Maildb = Nothing
Set MailDoc = Nothing
Set Body = Nothing
Set Session = Nothing
Exit Sub

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


RE: $$Excel-Macros$$ Return More than 1 value from Function

2011-12-22 Thread Asa Rossoff
Hi Hanumant,

Yes, similar but simpler.  A user-defined type looks much like a
class/object in VBA usage, but has fewer features ands doesn't require Set
commands to associate a variable with it or the New keyword for creating
instances.  The major uses for user-defined types at least historically,
were for writing structered data to files, as they take a fixed number of
bytes (at least if the elements are of fixed size) and allow for random
record retrieval like a database; and for interacting with the Windows API
functions, many of which pass C structs which are the C-language equivalent.
You can of course use them similarly with your own code for passing related
data around. 

 

A class is a custom object.  It can do much more than store and return
values.  Storing and returning values can be done in it's simplest as fields
of the object (public class-level variables; they are treated just like
properties from the calling procedure).  Values and be stored and retrieved
using Property Let, Get, and Set procedures within the class too, which
create properties and are particularly useful when you need to execute code
or have the properties actually effect something when accessed.  Classes can
also have methods (public Sub and Function procedures) and events.  See
Writing a Property Procedure
 , Executing code
when setting properties
 , Calling Property
Procedures  ,
Programming with Objects: Using Classes (Visual Basic VS2008 - same concept,
some syntax differences)
 

 

Here's a simple class example:

 

Create a class module, call it "Self" with the following code:

Public Name As String

Public Address As String

 

In a standard module (or elsewhere) enter the following code:

Function WhoIsSelf() As Self

Set WhoIsSelf = New Self

With WhoIsSelf

.Name = "Samwise Gamgee"

.Address = "Hobbiton, The Shire, Arthedain, Eriador, Middle Earth" ' (I
think)

End With

End Function

 

Sub Test_WhoIsSelf()

Dim My As Self

Set My = WhoIsSelf

MsgBox "I Am " & My.Name & " and my address is " & My.Address & ".",
vbInformation

End Sub

 

It uses fields of the Self class to store your values, and has the same
effect as the user-defined type example.

 

Regarding Collections: A Collection is a built-in VBA class that you can use
to create an object that holds an ordered, indexed collection of name/value
pairs, where value can have any data type or even be an object.  Built-in
Excel objects often have collections: Sheets() is a collection containing
all the sheets in a workbooks, for example.  Members of a collection don't
have to all have the same data type.  See the help topic for more:
Collection Object  .

 

One more built-in object for storing and passing data together is the
Dictionary Object  ,
which allows you to simply store name/value pairs (unordered)

 

Asa

 

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of hanumant shinde
Sent: Thursday, December 22, 2011 9:15 AM
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ Return More than 1 value from Function

 





Thanks a lot Asa,

 

I think this might be some what smilar to class thing. just a guess

 

 

From: Asa Rossoff 
To: excel-macros@googlegroups.com 
Sent: Thursday, 22 December 2011 3:04 AM
Subject: RE: $$Excel-Macros$$ Return More than 1 value from Function




I won't tackle classes right now, but here are a couple more methods:

4. User-Defined Data Types

5. Collections

 

Here's a user-defined data type example:

Type ContactInfo

Name As String

Address As String

End Type

 

Function WhoAmi() As ContactInfo

With WhoAmi

.Name = "Samwise Gamgee"

.Address = "Hobbiton, The Shire, Arthedain, Eriador, Middle Earth" ' (I
think)

End With

End Function

 

Sub Test_WhoAmi()

Dim My As ContactInfo

My = WhoAmI

MsgBox "I Am " & My.Name & " and my address is " & My.Address & ".",
vbInformation

End Sub

 

Asa

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of hanumant shinde
Sent: Wednesday, December 21, 2011 1:08 PM
To: Excel Group
Subject: $$Excel-Macros$$ Return More than 1 value from Function

 

Hi,

 

How can we return more than 1 value from 1 function.

 

1. using array

2. using By Ref for the values.

3. Create a class with the properties you require to return and then return
the object of that class from the function.

 

i understand 1st two methods. can somebody explain the 3rd and how to
achieve this with the proper example.

i have never created class so i dont know ANYTHING about it.

-- 
FORUM RULES (934+ members already BANNED for violation)
 
1) Use concise, ac

Re: $$Excel-Macros$$ List all Excel Workbooks

2011-12-22 Thread siti Vi
Hi Charlie,
Please check and try this code, if it helps...

'---standard Module-
Sub *GenerateList*()
   ' sitiVi / jakarta 23 Dec 2011
   ' in answering:
   ' http://groups.google.com/group/ _
   ' excel-macros/browse_thread/thread/9dbda650f1d09d65#
   '
   Dim ArDir As Variant, iDir As Integer
   ' please edit this list of Path..
   ArDir = Array(*"C:\MyData", "F\", "E:\", "D\xFolder\yFolder"*)
   ' ~~
   Application.Calculation = xlCalculationManual
   Application.ScreenUpdating = False
   For iDir = LBound(ArDir) To UBound(ArDir)
  Call ListFiles(ArDir(iDir))
   Next iDir
   Columns("A:B").EntireColumn.AutoFit
   Application.ScreenUpdating = True
   Application.Calculation = xlCalculationAutomatic
End Sub

Private Sub *ListFiles*(ByVal SpecifiedDir As String)
   ' sitiVi / jakarta 23 Dec 2011
   ' in answering:
   ' http://groups.google.com/group/ _
   ' excel-macros/browse_thread/thread/9dbda650f1d09d65#
   '
   Dim vFName As Variant, RowN As Long
   RowN = Cells(1).CurrentRegion.Rows.Count
   If RowN = 1 Then RowN = 0
   With Application.FileSearch
  .NewSearch
  .LookIn = SpecifiedDir
  .SearchSubFolders = True
  .FileType = msoFileTypeExcelWorkbooks
  REM .Execute
  If .Execute > 0 Then
 For Each vFName In .FoundFiles
RowN = RowN + 1
ActiveSheet.Cells(RowN, 1).Value = SpecifiedDir
ActiveSheet.Cells(RowN, 2).Value = vFName
 Next
  End If
   End With
End Sub
'--end of code -

Looking forward to hear if this code works (or not)..

Thx, Best regards & Wassalamualaikum wr wb.
siti Vi



On Fri, Dec 23, 2011 at 4:45 AM, Cab Boose  wrote:
>
> Hi
> There are plenty of solutions for listing open excel files.
> I would like to list all excel workbooks on my C:  and F: drives.   They
are all over the place. My bad housekeeping!
> How do I get the complete address for each workbook ?   either with a
hyperlink or not.  But do need to print out the list.
> Using Excel 2000 at the moment but soon hopefully to upgrade to 2003
> Thanks & Merry Christmas to all
>
> regards
> Charlie

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


$$Excel-Macros$$ Re: Complex Macros

2011-12-22 Thread HarryP Knuckles
If I can help by rolling up my question. Is:

Is it possible to build a macro that can complete the following
objectives:

1) Match two files (from two different directories x,y on a network)
from a list made in excel (vlookup?).

2) Rename the new workbook i.e.  Richard CR006 V2.xls and worksheet
tab i.e. CR001 V2 as is used below).

3) Save new workbook in different directory z

I really appreciate the expertise of your team at Google - nothing
less than outstanding.
Please let me know if any of this makes sense.

Happy Holidays to those of you get them!

Sincerely,
Kent


On Dec 22, 4:13 pm, HarryP Knuckles 
wrote:
> Good afternoon Folks,
>                                      I have two directories of excel
> files (Part 1 and Part 2) that contain the same information except the
> second directory (part 2’s) contains newer information than the first
> directory (part 1’s).
>
> I have a list embedded into a worksheet of my macro workbook that
> shows the relationship (one for one) between the titles of the first
> directory (part 1's) with the titles of the second directory (part
> 2's) As illustrated below.
>
> Here is an example:
>
>    Part 1 FileName                Part 2
> FileName                              RESULTING FileName
>
> Richard CR004 V2.xls    Richard4.xls            Richard CR004 V3.xls
> Richard CR005 V2.xls    Richard5.xls            Richard CR005 V3.xls
> Richard CR006 V2.xls    Richard6.xls            Richard CR006 V3.xls
> Richard CR007 V2.xls    Richard7.xls            Richard CR007 V3.xls
> etc.
>
> My challenge is to complete the following tasks for each of the
> workbooks found within the (Part 2) directory:
>
> 1)      Automatically open the first workbook from the (part 2) directory
> (process needs to loop till all files in folder have been opened and
> saved).
>
> 2)      To then vlookup (or VB equivalent) the title (part 2) of the
> workbook with the list that will be embedded in the macro workbook to
> get the orginal name (from Part 1). I.e. Richard4.xls is (Part 2) of
> Richard CR004 V2.xls (part 1).
>
> Once there is a match; if there is a match.
>
> 3)      Rename and save the workbook into a new third directory (resulting
> fileName) with the matched name that is consistent with the first
> directory.
>
> Any help that you can provide would be greatly appreciated!!
>
> Regards,
> Kent

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


$$Excel-Macros$$ List all Excel Workbooks

2011-12-22 Thread Cab Boose
Hi

There are plenty of solutions for listing open excel files.

I would like to list all excel workbooks on my C:  and F: drives.   They
are all over the place. My bad housekeeping!

How do I get the complete address for each workbook ?   either with a
hyperlink or not.  But do need to print out the list.

Using Excel 2000 at the moment but soon hopefully to upgrade to 2003

Thanks & Merry Christmas to all

regards


Charlie

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


$$Excel-Macros$$ Complex Macros

2011-12-22 Thread HarryP Knuckles
Good afternoon Folks,
 I have two directories of excel
files (Part 1 and Part 2) that contain the same information except the
second directory (part 2’s) contains newer information than the first
directory (part 1’s).

I have a list embedded into a worksheet of my macro workbook that
shows the relationship (one for one) between the titles of the first
directory (part 1's) with the titles of the second directory (part
2's) As illustrated below.

Here is an example:

   Part 1 FileNamePart 2
FileName  RESULTING FileName

Richard CR004 V2.xlsRichard4.xlsRichard CR004 V3.xls
Richard CR005 V2.xlsRichard5.xlsRichard CR005 V3.xls
Richard CR006 V2.xlsRichard6.xlsRichard CR006 V3.xls
Richard CR007 V2.xlsRichard7.xlsRichard CR007 V3.xls
etc.


My challenge is to complete the following tasks for each of the
workbooks found within the (Part 2) directory:

1)  Automatically open the first workbook from the (part 2) directory
(process needs to loop till all files in folder have been opened and
saved).

2)  To then vlookup (or VB equivalent) the title (part 2) of the
workbook with the list that will be embedded in the macro workbook to
get the orginal name (from Part 1). I.e. Richard4.xls is (Part 2) of
Richard CR004 V2.xls (part 1).

Once there is a match; if there is a match.

3)  Rename and save the workbook into a new third directory (resulting
fileName) with the matched name that is consistent with the first
directory.

Any help that you can provide would be greatly appreciated!!

Regards,
Kent

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ Copy multiples tables from one worksheet to separate worksheets

2011-12-22 Thread Mahesh parab
Hi

Try :

Sub Mtest()
Dim ws2 As Worksheet
Dim c As Range
For Each c In Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row)
  If c.MergeCells Then
  c.CurrentRegion.Copy
  Set ws2 = Worksheets.Add(After:=Sheets(Sheets.Count))
  With ws2
  .Name = c.Value
  .Range("A1").PasteSpecial Paste:=xlPasteValues
   Application.CutCopyMode = False
  .ListObjects.Add(xlSrcRange,
.UsedRange.Offset(1).Resize(ActiveSheet.UsedRange.Rows.Count - 1), ,
xlYes).Name = " "
  .Range("D2:F" & Cells(Rows.Count, 6).End(xlUp).Row).NumberFormat =
"0.00%"
  .Range("A2").Resize(3).EntireRow.Insert shift:=xlDown
  .Range("A3").Formula = "=""Number of School in Table :
""&COUNTA(C[1])-1"
  End With
  End If
  Next
End Sub

HTH
Mahesh

On Thu, Dec 22, 2011 at 8:02 AM, 0 1  wrote:

> (Second attempt to attach file. ... )
>
> Attached is a file with some sample tables. The README worksheet includes
> some notes and the tasks I'm trying to automate (the main one is moving the
> tables to separate worksheets, but I'd of course welcome suggestions for
> any of the others).
>
> Thanks for any guidance.
>
> --
> FORUM RULES (934+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5) Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> --
> To post to this group, send email to excel-macros@googlegroups.com
>

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


RE: $$Excel-Macros$$ VBA Helps

2011-12-22 Thread Excel_Lover
Hi
Please see the attached Sheet. Hope it will Help

Rajan.

-Original Message-
From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of RockyFontane
Sent: 22 December 2011 21:56
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ VBA Helps

I have 3 Combo Boxes.  1, 2 and 3.  I only want #1 to show when the value in
A1 equals 1; 2 to show when the value in A1 equals 2 and 3 to show if the
value in A1 equals 3.

Can you help me with that code?

--
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security
measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.


--
To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


CboVisible.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12


RE: $$Excel-Macros$$ reference vlookup sheets

2011-12-22 Thread Excel_Lover
See the attached File 

Rajan.

-Original Message-
From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of dguillett1
Sent: 22 December 2011 21:14
To: MS EXCEL AND VBA MACROS
Subject: Re: $$Excel-Macros$$ reference vlookup sheets

You shouldn't need code here. Look in the HELP index for INDIRECT and apply
to your vlookup formula

Don Guillett
SalesAid Software
dguille...@gmail.com
-Original Message-
From: Selva
Sent: Wednesday, December 21, 2011 6:02 PM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ reference vlookup sheets


the follwoing is the code i;m using to reference 7 sheets into a
master list, the problem i'm running into is the vlookup it's selva

i need B2 to loop ie once the first cell is tetermin to be b2 i need
marco to look b3,b4,b5,b6,b7 ect..B"end"

any thoughts on how i can do this

can this be setup in a Array??



Range("m2").Select

Do Until IsEmpty(ActiveCell)



If ActiveCell.Value = "home" Then
ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,home!B:K,
10,FALSE)"

ElseIf ActiveCell.Value = "windows" Then
ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,windows!B:K,
10,FALSE)"

ElseIf ActiveCell.Value = "messages" Then
ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,messages!B:K,
10,FALSE)"


ElseIf ActiveCell.Value = "ready" Then
ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,ready!B:K,10,FALSE)"

ElseIf ActiveCell.Value = "select" Then
ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,select!B:K,
10,FALSE)"

ElseIf ActiveCell.Value = "phone" Then
ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,phone!B:K,10,FALSE)"

 ElseIf ActiveCell.Value = "asset" Then
ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,asset!B:K,10,FALSE)"



End If



ActiveCell.Offset(1, 0).Select



Loop

End Sub

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please 
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will

not get quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security 
measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.


--
To post to this group, send email to excel-macros@googlegroups.com 

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security
measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.


--
To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


IndirectFunction.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet


$$Excel-Macros$$ JOB (Excel/Access VBA, 2-3 yrs experience, Ernst & Young)

2011-12-22 Thread Ayush Jain
Hi,

We urgently need some Excel and Access VBA developers with upto 2-3 yrs of
experience and good communication skills.
Please send me resumes of your friends, colleagues and yours @
jainayus...@gmail.com

Thanks.
Best regards,
Ayush Jain
Microsoft MVP
Group Manager

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ reference vlookup sheets

2011-12-22 Thread NOORAIN ANSARI
Dear selva,

Please see attached sheet to use vlookup in different Sheet.

On Thu, Dec 22, 2011 at 5:32 AM, Selva  wrote:

>
> the follwoing is the code i;m using to reference 7 sheets into a
> master list, the problem i'm running into is the vlookup it's selva
>
> i need B2 to loop ie once the first cell is tetermin to be b2 i need
> marco to look b3,b4,b5,b6,b7 ect..B"end"
>
> any thoughts on how i can do this
>
> can this be setup in a Array??
>
>
>
> Range("m2").Select
>
> Do Until IsEmpty(ActiveCell)
>
>
>
>If ActiveCell.Value = "home" Then
>ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,home!B:K,
> 10,FALSE)"
>
>ElseIf ActiveCell.Value = "windows" Then
>ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,windows!B:K,
> 10,FALSE)"
>
>ElseIf ActiveCell.Value = "messages" Then
>ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,messages!B:K,
> 10,FALSE)"
>
>
>ElseIf ActiveCell.Value = "ready" Then
>ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,ready!B:K,10,FALSE)"
>
>ElseIf ActiveCell.Value = "select" Then
>ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,select!B:K,
> 10,FALSE)"
>
>ElseIf ActiveCell.Value = "phone" Then
>ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,phone!B:K,10,FALSE)"
>
> ElseIf ActiveCell.Value = "asset" Then
>ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,asset!B:K,10,FALSE)"
>
>
>
>End If
>
>
>
>ActiveCell.Offset(1, 0).Select
>
>
>
> Loop
>
> End Sub
>
> --
> FORUM RULES (934+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5)  Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> --
> To post to this group, send email to excel-macros@googlegroups.com
>



-- 
Thanks & regards,
Noorain Ansari
 *http://excelmacroworld.blogspot.com/*
*http://noorain-ansari.blogspot.com/* 

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Vlookup+Indirect.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet


Re: $$Excel-Macros$$ VBA Helps

2011-12-22 Thread NOORAIN ANSARI
Dear Rocky,

Please see attached Sheet.

-- 
Thanks & regards,
Noorain Ansari
 *http://excelmacroworld.blogspot.com/*
*http://noorain-ansari.blogspot.com/* 

On Thu, Dec 22, 2011 at 10:45 PM, RockyFontane  wrote:

> Thank you for the quick turn around.  Apologize if my request was
> unclear.  Using your spreadsheet, if A1 is equal to 1, I only want to
> see ComboBox 1.  If it's equal to 2, then only show Combo2, etc.  Can
> that be done?
>
> On Dec 22, 12:03 pm, NOORAIN ANSARI  wrote:
> > Dear Rocky,
> >
> > Please see attached sheet, I hope your requirement is this.
> >
> > --
> > Thanks & regards,
> > Noorain Ansari
> >  *http://excelmacroworld.blogspot.com/*<
> http://excelmacroworld.blogspot.com/>
> > *http://noorain-ansari.blogspot.com/*<
> http://noorain-ansari.blogspot.com/>
> >
> >
> >
> >
> >
> >
> >
> > On Thu, Dec 22, 2011 at 9:56 PM, RockyFontane 
> wrote:
> > > I have 3 Combo Boxes.  1, 2 and 3.  I only want #1 to show when the
> > > value in A1 equals 1; 2 to show when the value in A1 equals 2 and 3 to
> > > show if the value in A1 equals 3.
> >
> > > Can you help me with that code?
> >
> > > --
> > > FORUM RULES (934+ members already BANNED for violation)
> >
> > > 1) Use concise, accurate thread titles. Poor thread titles, like Please
> > > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> > > will not get quick attention or may not be answered.
> >
> > > 2) Don't post a question in the thread of another member.
> >
> > > 3) Don't post questions regarding breaking or bypassing any security
> > > measure.
> >
> > > 4) Acknowledge the responses you receive, good or bad.
> >
> > > 5)  Cross-promotion of, or links to, forums competitive to this forum
> in
> > > signatures are prohibited.
> >
> > > NOTE  : Don't ever post personal or confidential data in a workbook.
> Forum
> > > owners and members are not responsible for any loss.
> >
> > >
> --
> > > To post to this group, send email to excel-macros@googlegroups.com
> >
> >
> >
> >  Sample.xlsm
> > 27KViewDownload
>
> --
> FORUM RULES (934+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5)  Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> --
> To post to this group, send email to excel-macros@googlegroups.com
>

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Copy of Sample(Solved).xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12


Re: $$Excel-Macros$$ Return More than 1 value from Function

2011-12-22 Thread hanumant shinde


sorry i didnt understand what you mean.
 
can somebody please help me with this.
From: dguillett1 
>To: excel-macros@googlegroups.com 
>Sent: Wednesday, 21 December 2011 9:33 PM
>Subject: Re: $$Excel-Macros$$ Return More than 1 value from Function
>
>
>homework??
>
>Don Guillett
>SalesAid Software
>dguille...@gmail.com
>
>From: hanumant shinde 
>Sent: Wednesday, December 21, 2011 3:08 PM
>To: Excel Group 
>Subject: $$Excel-Macros$$ Return More than 1 value from Function
>Hi,
>
>How can we return more than 1 value from 1 function.
>
>1. using array
>2. using By Ref for the values.
>3. Create a class with the properties you require to return and then return 
>the object of that class from the function.
>
>i understand 1st two methods. can somebody explain the 3rd and how to achieve 
>this with the proper example.
>i have never created class so i dont know ANYTHING about it.-- 
>FORUM RULES (934+ members already BANNED for violation)
> 
>1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
>Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
>quick attention or may not be answered.
> 
>2) Don't post a question in the thread of another member.
> 
>3) Don't post questions regarding breaking or bypassing any security measure.
> 
>4) Acknowledge the responses you receive, good or bad.
> 
>5) Cross-promotion of, or links to, forums competitive to this forum in 
>signatures are prohibited. 
> 
>NOTE : Don't ever post personal or confidential data in a workbook. Forum 
>owners and members are not responsible for any loss.
> 
>--
>To post to this group, send email to excel-macros@googlegroups.com
>-- 
>FORUM RULES (934+ members already BANNED for violation)
> 
>1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
>Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
>quick attention or may not be answered.
> 
>2) Don't post a question in the thread of another member.
> 
>3) Don't post questions regarding breaking or bypassing any security measure.
> 
>4) Acknowledge the responses you receive, good or bad.
> 
>5) Cross-promotion of, or links to, forums competitive to this forum in 
>signatures are prohibited. 
> 
>NOTE : Don't ever post personal or confidential data in a workbook. Forum 
>owners and members are not responsible for any loss.
> 
>--
>To post to this group, send email to excel-macros@googlegroups.com
>
>
>

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ VBA Helps

2011-12-22 Thread RockyFontane
Thank you for the quick turn around.  Apologize if my request was
unclear.  Using your spreadsheet, if A1 is equal to 1, I only want to
see ComboBox 1.  If it's equal to 2, then only show Combo2, etc.  Can
that be done?

On Dec 22, 12:03 pm, NOORAIN ANSARI  wrote:
> Dear Rocky,
>
> Please see attached sheet, I hope your requirement is this.
>
> --
> Thanks & regards,
> Noorain Ansari
>  *http://excelmacroworld.blogspot.com/*
> *http://noorain-ansari.blogspot.com/*
>
>
>
>
>
>
>
> On Thu, Dec 22, 2011 at 9:56 PM, RockyFontane  wrote:
> > I have 3 Combo Boxes.  1, 2 and 3.  I only want #1 to show when the
> > value in A1 equals 1; 2 to show when the value in A1 equals 2 and 3 to
> > show if the value in A1 equals 3.
>
> > Can you help me with that code?
>
> > --
> > FORUM RULES (934+ members already BANNED for violation)
>
> > 1) Use concise, accurate thread titles. Poor thread titles, like Please
> > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> > will not get quick attention or may not be answered.
>
> > 2) Don't post a question in the thread of another member.
>
> > 3) Don't post questions regarding breaking or bypassing any security
> > measure.
>
> > 4) Acknowledge the responses you receive, good or bad.
>
> > 5)  Cross-promotion of, or links to, forums competitive to this forum in
> > signatures are prohibited.
>
> > NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> > owners and members are not responsible for any loss.
>
> > --
> > To post to this group, send email to excel-macros@googlegroups.com
>
>
>
>  Sample.xlsm
> 27KViewDownload

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ Return More than 1 value from Function

2011-12-22 Thread hanumant shinde


Thanks a lot Asa,
 
I think this might be some what smilar to class thing. just a guess
 
 
From: Asa Rossoff 
>To: excel-macros@googlegroups.com 
>Sent: Thursday, 22 December 2011 3:04 AM
>Subject: RE: $$Excel-Macros$$ Return More than 1 value from Function
>
>
>I won't tackle classes right now, but here are a couple more methods:
>4. User-Defined Data Types
>5. Collections
> 
>Here's a user-defined data type example:
>Type ContactInfo
>    Name As String
>    Address As String
>End Type
> 
>Function WhoAmi() As ContactInfo
>With WhoAmi
>    .Name = "Samwise Gamgee"
>    .Address = "Hobbiton, The Shire, Arthedain, Eriador, Middle Earth" ' (I 
>think)
>End With
>End Function
> 
>Sub Test_WhoAmi()
>Dim My As ContactInfo
>My = WhoAmI
>MsgBox "I Am " & My.Name & " and my address is " & My.Address & ".", 
>vbInformation
>End Sub
> 
>Asa
> 
>From:excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] On 
>Behalf Of hanumant shinde
>Sent: Wednesday, December 21, 2011 1:08 PM
>To: Excel Group
>Subject: $$Excel-Macros$$ Return More than 1 value from Function
> 
>Hi,
> 
>How can we return more than 1 value from 1 function.
> 
>1. using array
>2. using By Ref for the values.
>3. Create a class with the properties you require to return and then return 
>the object of that class from the function.
> 
>i understand 1st two methods. can somebody explain the 3rd and how to achieve 
>this with the proper example.
>i have never created class so i dont know ANYTHING about it.
>-- 
>FORUM RULES (934+ members already BANNED for violation)
> 
>1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
>Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
>quick attention or may not be answered.
> 
>2) Don't post a question in the thread of another member.
> 
>3) Don't post questions regarding breaking or bypassing any security measure.
> 
>4) Acknowledge the responses you receive, good or bad.
> 
>5) Cross-promotion of, or links to, forums competitive to this forum in 
>signatures are prohibited. 
> 
>NOTE : Don't ever post personal or confidential data in a workbook. Forum 
>owners and members are not responsible for any loss.
> 
>--
>To post to this group, send email to excel-macros@googlegroups.com-- 
>FORUM RULES (934+ members already BANNED for violation)
> 
>1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
>Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
>quick attention or may not be answered.
> 
>2) Don't post a question in the thread of another member.
> 
>3) Don't post questions regarding breaking or bypassing any security measure.
> 
>4) Acknowledge the responses you receive, good or bad.
> 
>5) Cross-promotion of, or links to, forums competitive to this forum in 
>signatures are prohibited. 
> 
>NOTE : Don't ever post personal or confidential data in a workbook. Forum 
>owners and members are not responsible for any loss.
> 
>--
>To post to this group, send email to excel-macros@googlegroups.com
>
>
>

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ VBA Helps

2011-12-22 Thread NOORAIN ANSARI
Dear Rocky,

Please see attached sheet, I hope your requirement is this.

-- 
Thanks & regards,
Noorain Ansari
 *http://excelmacroworld.blogspot.com/*
*http://noorain-ansari.blogspot.com/* 

On Thu, Dec 22, 2011 at 9:56 PM, RockyFontane  wrote:

> I have 3 Combo Boxes.  1, 2 and 3.  I only want #1 to show when the
> value in A1 equals 1; 2 to show when the value in A1 equals 2 and 3 to
> show if the value in A1 equals 3.
>
> Can you help me with that code?
>
> --
> FORUM RULES (934+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5)  Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> --
> To post to this group, send email to excel-macros@googlegroups.com
>

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Sample.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12


$$Excel-Macros$$ VBA Helps

2011-12-22 Thread RockyFontane
I have 3 Combo Boxes.  1, 2 and 3.  I only want #1 to show when the
value in A1 equals 1; 2 to show when the value in A1 equals 2 and 3 to
show if the value in A1 equals 3.

Can you help me with that code?

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ Searching DOUBT

2011-12-22 Thread dguillett1
File attached

Don Guillett
SalesAid Software
dguille...@gmail.com

From: SAJID MEMON 
Sent: Thursday, December 22, 2011 1:10 AM
To: Sundarvelan Natarajan 
Subject: $$Excel-Macros$$ Searching DOUBT


 



  
Dear Expert

I want to make some search from database sheet. if i want to type in sheet1 e3 
cell what ever data that should show below
example wise just type my name "sajid" that will show below. I want when i type 
any PAN catagory or VAT No catagory then
it shows maching rows all data.
 
please co-operate me in vba coding (FILE ATTACHED)
 
Regards
Sajid Memon

 

-- 
FORUM RULES (934+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.
 
--
To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


Re: $$Excel-Macros$$ reference vlookup sheets

2011-12-22 Thread dguillett1
You shouldn't need code here. Look in the HELP index for INDIRECT and apply 
to your vlookup formula


Don Guillett
SalesAid Software
dguille...@gmail.com
-Original Message- 
From: Selva

Sent: Wednesday, December 21, 2011 6:02 PM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ reference vlookup sheets


the follwoing is the code i;m using to reference 7 sheets into a
master list, the problem i'm running into is the vlookup it's selva

i need B2 to loop ie once the first cell is tetermin to be b2 i need
marco to look b3,b4,b5,b6,b7 ect..B"end"

any thoughts on how i can do this

can this be setup in a Array??



Range("m2").Select

Do Until IsEmpty(ActiveCell)



   If ActiveCell.Value = "home" Then
   ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,home!B:K,
10,FALSE)"

   ElseIf ActiveCell.Value = "windows" Then
   ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,windows!B:K,
10,FALSE)"

   ElseIf ActiveCell.Value = "messages" Then
   ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,messages!B:K,
10,FALSE)"


   ElseIf ActiveCell.Value = "ready" Then
   ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,ready!B:K,10,FALSE)"

   ElseIf ActiveCell.Value = "select" Then
   ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,select!B:K,
10,FALSE)"

   ElseIf ActiveCell.Value = "phone" Then
   ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,phone!B:K,10,FALSE)"

ElseIf ActiveCell.Value = "asset" Then
   ActiveCell.Offset(0, -2).Value = "=VLOOKUP(B2,asset!B:K,10,FALSE)"



   End If



   ActiveCell.Offset(1, 0).Select



Loop

End Sub

--
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please 
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will 
not get quick attention or may not be answered.


2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security 
measure.


4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited.


NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.


--
To post to this group, send email to excel-macros@googlegroups.com 


--
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. 


NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


$$Excel-Macros$$ Vba code required

2011-12-22 Thread KAUSHIK SAVLA
Hi,

I am looking for solution to below:-

I receive No. of emails from some people asking for tax advise in Outlook
 2003.

Then I create tax advice and I attach the file.

I need to reply to the email received below:-

Hi *Sender*(as per email),

As requested, please find attached below payslip showing tax payable.

(Attachment file would be here)

Kindly let me know in case you require further information.

Best Regards,
Kaushik Savla - Assistant Manager
JLT India Pvt Ltd

What I want to do - Firstly, I want Sender name to be captured
automatically as per email received from sender. Secondly, I want a code
which will write the above green highlighted text message automatically.

Please suggest me some solution. Your valuable time is highly appreciated
in this matter.

Anticipating your assistance on aforesaid matter.

Regards,
Kaushik Savla

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


$$Excel-Macros$$ Need assistance in calculating FD intrest in excel

2011-12-22 Thread santosh subudhi
Hi Group,

I am trying to calculate the interest in excel for a fixed deposit I have
done in a leading bank with

Investment Amt 30,000/-
ROI 9.6%
Period 500 days (16 months and 12 days)
Maturity value is 34,159.00/-
Compounded Quarterly

I am currently referring this link
http://www.allbankingsolutions.com/fdcal.htm

Attached is the sheet that I am trying to prepare it is working properly
when I am trying to add additional days in the formula.

Would request any one of you to fix the formula.

Also at the same time please suggest me how to make a RD calculation in
excel for 12 months or more payment made monthly with ROI 8.5%

-- 
Regards
Santosh
santoshkumar.subu...@gmail.com

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com


FD calculation.xlsx
Description: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet


Re: $$Excel-Macros$$ For Excel Beginner, please try this test...

2011-12-22 Thread Chuka Lkh
please attach file

On Tue, Dec 20, 2011 at 10:58 PM, Vikash Chandra wrote:

> Dear Ravi,
> I didnt find any attachment.Please send it once again.
> Thanks & Regards,
> Vikash Chandra
> Bangalore
> 9902622922
>
> On Mon, Dec 19, 2011 at 12:19 PM, Ravinder Negi 
> wrote:
> > For Excel Beginner, please try this test...and enhance your
> > skills..
> >
> > --
> > FORUM RULES (934+ members already BANNED for violation)
> >
> > 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> >
> > 2) Don't post a question in the thread of another member.
> >
> > 3) Don't post questions regarding breaking or bypassing any security
> measure.
> >
> > 4) Acknowledge the responses you receive, good or bad.
> >
> > 5)  Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
> >
> > NOTE  : Don't ever post personal or confidential data in a workbook.
> Forum owners and members are not responsible for any loss.
> >
> >
> --
> > To post to this group, send email to excel-macros@googlegroups.com
>
>
>
> --
>
> --
> FORUM RULES (934+ members already BANNED for violation)
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
>
> 2) Don't post a question in the thread of another member.
>
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
>
> 4) Acknowledge the responses you receive, good or bad.
>
> 5)  Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
>
> --
> To post to this group, send email to excel-macros@googlegroups.com
>

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

--
To post to this group, send email to excel-macros@googlegroups.com