Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default make a macro to insert a macro

is there anyway to insert a macro that puts a macro into another
file..

i currently have a macro that opens up other excel files.. I need to
insert a UDF into those xls files.. is there anyway to make a macro
create a module and insert code?

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default make a macro to insert a macro

Hi mithu

See this page from Chip Pearson
http://www.cpearson.com/excel/vbe.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mithu" wrote in message oups.com...
is there anyway to insert a macro that puts a macro into another
file..

i currently have a macro that opens up other excel files.. I need to
insert a UDF into those xls files.. is there anyway to make a macro
create a module and insert code?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default make a macro to insert a macro

The reason i need this is because i am editing a folder with out 300
excel files.. i know how to access all files one at a time.

i need to extract a number from cell a1 which is usually something
like "company name 34222 dkafaf" where i am extracting those numbers
in this case 34222.

i was told to use this function below in conjunction with vlookup.. so
like =vlookup(numberit(a1).....) this works great.. but i need this
function in all my files for it to work.

Function NumberIt(CompanyCell As Range) As Double
C = CompanyCell.Value
For x = 1 To Len(C)
If IsNumeric(Mid(C, x, 1)) Then n = n & Mid(C, x, 1)
Next x
NumberIt = --n
End Function


i place this function in my main excel spreadsheet that i run the
macro from..
it works fine if one of the files i am editing has that function in
it.. but it wont if it doesnt have that function..

so i am trying to write a code that will add module and add this
numberIT function to each of the spreadsheets..

i hope this makes sense.. please let me know if there is an easier
way.

On Mar 19, 2:47 pm, "mithu" wrote:
is there anyway to insert a macro that puts a macro into another
file..

i currently have a macro that opens up other excel files.. I need to
insert a UDF into those xls files.. is there anyway to make a macro
create a module and insert code?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default make a macro to insert a macro

Do you only want the values from A1 of every excel file in the folder ???

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mithu" wrote in message ups.com...
The reason i need this is because i am editing a folder with out 300
excel files.. i know how to access all files one at a time.

i need to extract a number from cell a1 which is usually something
like "company name 34222 dkafaf" where i am extracting those numbers
in this case 34222.

i was told to use this function below in conjunction with vlookup.. so
like =vlookup(numberit(a1).....) this works great.. but i need this
function in all my files for it to work.

Function NumberIt(CompanyCell As Range) As Double
C = CompanyCell.Value
For x = 1 To Len(C)
If IsNumeric(Mid(C, x, 1)) Then n = n & Mid(C, x, 1)
Next x
NumberIt = --n
End Function


i place this function in my main excel spreadsheet that i run the
macro from..
it works fine if one of the files i am editing has that function in
it.. but it wont if it doesnt have that function..

so i am trying to write a code that will add module and add this
numberIT function to each of the spreadsheets..

i hope this makes sense.. please let me know if there is an easier
way.

On Mar 19, 2:47 pm, "mithu" wrote:
is there anyway to insert a macro that puts a macro into another
file..

i currently have a macro that opens up other excel files.. I need to
insert a UDF into those xls files.. is there anyway to make a macro
create a module and insert code?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default make a macro to insert a macro

Yes. the company code is in A1 along with some text.. I am able to
extract it using that function. but i need to put that function in
every spreadsheet.

is there anyway to have a global function that will work on any
spreadsheet i open?


On Mar 19, 4:31 pm, "Ron de Bruin" wrote:
Do you only want the values from A1 of every excel file in the folder ???

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"mithu" wrote in oglegroups.com...
The reason i need this is because i am editing a folder with out 300
excel files.. i know how to access all files one at a time.


i need to extract a number from cell a1 which is usually something
like "company name 34222 dkafaf" where i am extracting those numbers
in this case 34222.


i was told to use this function below in conjunction with vlookup.. so
like =vlookup(numberit(a1).....) this works great.. but i need this
function in all my files for it to work.


Function NumberIt(CompanyCell As Range) As Double
C = CompanyCell.Value
For x = 1 To Len(C)
If IsNumeric(Mid(C, x, 1)) Then n = n & Mid(C, x, 1)
Next x
NumberIt = --n
End Function


i place this function in my main excel spreadsheet that i run the
macro from..
it works fine if one of the files i am editing has that function in
it.. but it wont if it doesnt have that function..


so i am trying to write a code that will add module and add this
numberIT function to each of the spreadsheets..


i hope this makes sense.. please let me know if there is an easier
way.


On Mar 19, 2:47 pm, "mithu" wrote:
is there anyway to insert a macro that puts a macro into another
file..


i currently have a macro that opens up other excel files.. I need to
insert a UDF into those xls files.. is there anyway to make a macro
create a module and insert code?- Hide quoted text -


- Show quoted text -





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default make a macro to insert a macro

Yes you can put it in your personal.xls
http://www.rondebruin.nl/personal.htm

If you only want to have the value of A1 of each workbook you can create links to the cells
and then use the function in another cell.
You not have to open the workbooks then

See
http://www.rondebruin.nl/summary.htm



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mithu" wrote in message ups.com...
Yes. the company code is in A1 along with some text.. I am able to
extract it using that function. but i need to put that function in
every spreadsheet.

is there anyway to have a global function that will work on any
spreadsheet i open?


On Mar 19, 4:31 pm, "Ron de Bruin" wrote:
Do you only want the values from A1 of every excel file in the folder ???

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"mithu" wrote in oglegroups.com...
The reason i need this is because i am editing a folder with out 300
excel files.. i know how to access all files one at a time.


i need to extract a number from cell a1 which is usually something
like "company name 34222 dkafaf" where i am extracting those numbers
in this case 34222.


i was told to use this function below in conjunction with vlookup.. so
like =vlookup(numberit(a1).....) this works great.. but i need this
function in all my files for it to work.


Function NumberIt(CompanyCell As Range) As Double
C = CompanyCell.Value
For x = 1 To Len(C)
If IsNumeric(Mid(C, x, 1)) Then n = n & Mid(C, x, 1)
Next x
NumberIt = --n
End Function


i place this function in my main excel spreadsheet that i run the
macro from..
it works fine if one of the files i am editing has that function in
it.. but it wont if it doesnt have that function..


so i am trying to write a code that will add module and add this
numberIT function to each of the spreadsheets..


i hope this makes sense.. please let me know if there is an easier
way.


On Mar 19, 2:47 pm, "mithu" wrote:
is there anyway to insert a macro that puts a macro into another
file..


i currently have a macro that opens up other excel files.. I need to
insert a UDF into those xls files.. is there anyway to make a macro
create a module and insert code?- Hide quoted text -


- Show quoted text -



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default make a macro to insert a macro

Thanks ron..

your the man

On Mar 20, 11:02 am, "Ron de Bruin" wrote:
Yes you can put it in your personal.xlshttp://www.rondebruin.nl/personal.htm

If you only want to have the value of A1 of each workbook you can create links to the cells
and then use the function in another cell.
You not have to open the workbooks then

Seehttp://www.rondebruin.nl/summary.htm

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm



"mithu" wrote in oglegroups.com...
Yes. the company code is in A1 along with some text.. I am able to
extract it using that function. but i need to put that function in
every spreadsheet.


is there anyway to have a global function that will work on any
spreadsheet i open?


On Mar 19, 4:31 pm, "Ron de Bruin" wrote:
Do you only want the values from A1 of every excel file in the folder ???


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"mithu" wrote in oglegroups.com...
The reason i need this is because i am editing a folder with out 300
excel files.. i know how to access all files one at a time.


i need to extract a number from cell a1 which is usually something
like "company name 34222 dkafaf" where i am extracting those numbers
in this case 34222.


i was told to use this function below in conjunction with vlookup.. so
like =vlookup(numberit(a1).....) this works great.. but i need this
function in all my files for it to work.


Function NumberIt(CompanyCell As Range) As Double
C = CompanyCell.Value
For x = 1 To Len(C)
If IsNumeric(Mid(C, x, 1)) Then n = n & Mid(C, x, 1)
Next x
NumberIt = --n
End Function


i place this function in my main excel spreadsheet that i run the
macro from..
it works fine if one of the files i am editing has that function in
it.. but it wont if it doesnt have that function..


so i am trying to write a code that will add module and add this
numberIT function to each of the spreadsheets..


i hope this makes sense.. please let me know if there is an easier
way.


On Mar 19, 2:47 pm, "mithu" wrote:
is there anyway to insert a macro that puts a macro into another
file..


i currently have a macro that opens up other excel files.. I need to
insert a UDF into those xls files.. is there anyway to make a macro
create a module and insert code?- Hide quoted text -


- Show quoted text -- 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
DO NOT Insert Row - Macro Danny Excel Worksheet Functions 4 May 5th 06 01:04 AM
Insert Row macro not working Acct Supr - DCTC Excel Discussion (Misc queries) 3 October 7th 05 01:11 AM
Insert A Row Macro Mark Williams New Users to Excel 2 September 30th 05 07:03 PM
Insert Row with a macro Debi Excel Discussion (Misc queries) 5 March 11th 05 07:31 PM
How to insert a Macro within a macro? Thrava Excel Discussion (Misc queries) 3 February 8th 05 01:10 AM


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