Adding macro code to Personal Macro Workbook

Greetings,

I have a .bas file and would like to insert this code 
directly into my personal macro workbook.  However, I 
can't find a way to DIRECTLY insert the code.  The only 
thing close is to record a dummy macro, then step into 
that macro and insert the *.bas code that I really want.  
Can someone tell me of a better way to do this?
0
anonymous (74722)
10/16/2003 12:38:02 AM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
379 Views

Similar Articles

[PageSpeed] 39

I'd just open the .bas in notepad and copy|paste to my favorite module.

but if you right click on the project (when you're in the VBE), there's an
"Import File" option that may work the way you want.



mika wrote:
> 
> Greetings,
> 
> I have a .bas file and would like to insert this code
> directly into my personal macro workbook.  However, I
> can't find a way to DIRECTLY insert the code.  The only
> thing close is to record a dummy macro, then step into
> that macro and insert the *.bas code that I really want.
> Can someone tell me of a better way to do this?

-- 

Dave Peterson
ec35720@msn.com
0
ec35720 (10082)
10/16/2003 12:55:32 AM
Dear Mika
Open a new spreadsheet,Tools menu,Macro,Visual basic 
editor. Now in the editor expand the VBAProject,Right-
mouse click on Modules, select imporrt file and then 
browse to your .bas file.
Hope this helps you

Kind regards
Paul Falla
>-----Original Message-----
>Greetings,
>
>I have a .bas file and would like to insert this code 
>directly into my personal macro workbook.  However, I 
>can't find a way to DIRECTLY insert the code.  The only 
>thing close is to record a dummy macro, then step into 
>that macro and insert the *.bas code that I really want.  
>Can someone tell me of a better way to do this?
>.
>
0
paul_falla (99)
10/16/2003 8:35:06 AM
Reply:

Similar Artilces:

Creating a print-macro that'll only print page 1?
Hi, I have a spreadsheet that contains multiple sheets. I want to add a button that runs a macro, which only prints page 1 on the first sheet (called Scorekort). The "Scorekort" sheet contains 13 pages in total, but I only want to print the first page. Any ideas for this macro? Anders hi, Sub Macro1() Sheets("Scorekort").PrintOut From:=1, To:=1, Copies:=1, Preview:=True, Collate:=True End Sub if you don't want a print preview, Preview:=False -- isabelle Le 2011-05-21 04:16, Anders M a �crit : > Hi, > > I have a spreadsheet that contains multiple ...

Force a page break in code
I need to force a page break in the Detail_OnFormat Event when a value changes. How do I do that? Thanks, Bill Bill wrote: > I need to force a page break in the Detail_OnFormat > Event when a value changes. How do I do that? > > Thanks, > Bill Insert a PageBreak control from the ToolBox bar at the desired location. Even though such a control is never "visible" other than in design view they do still have a Visible property. That property effectively turns on and off the PageBreak so you can minipulate that in your code. -- Rick Brandt, Microsoft Access MVP...

Adding Contacts Folder as Address Book in Exchange Server
I am trying to add my contacts folder to my address book in Outlook XP and don't see the Tools, Options I used to see in Outlook 2000. How can I add this folder to my address book? Is that an option you can turn on or off for a profile in Exchange Server? Thanks!! -- Remove 'spam' from email address to contact me directly Right click on your Contacts folder, go to properties, outlook address book. Can you tick the box there? If not, go to tools, e-mail accounts, view/change address books, and make sure you have the Outlook Address Book option there. Then try right-clicking...

get rid of macro option at startup
I created and then deleted a macro in an Excel file. Why do I still get the warning box (i.e. the one asking if I want to enable or disable macros) when I open the file? Is there a way to get rid of this since I no longer have macros in this file? Thanks. Brad You need to delete the empty module.! Bill K "Brad Rench" <brench@comcast.net> wrote in message news:kSOdnb0Jjst9afaiXTWJkg@comcast.com... > I created and then deleted a macro in an Excel file. > > Why do I still get the warning box (i.e. the one asking if I want to enable > or disable macros) when I o...

Remove file Protection from an Excel workbook file from others
I have an older excel file created by someone who is no longer with my company. I want to use that file as a starting point to created another file. The file is set up as "read only". If I try to change any of the cells, I get the message that the "cell or chart is protected and therefore read only" and further tells me to unprotect before attempting the change. When I got to tools/protection/Unprotect Sheet I get the request for a password. I don't know the password as the file was created by another. I have tried "save as", from tools making sur...

Solver add-in and macros
I just got a new computer with XP and Excel 2003 and tried to run a macro that used to SOLVER add-in function and got a compile error. As a test I recorded a macro using the SOLVER and got the same result when I tried to run that macro. The Compile Error is "Sub or Function not defined". On the Knowledge Base it says I need to add SOLVER to the list of References in the VB Editor. When I go to the references list, SOLVER does not appear. When I open Help for VB and search for SOLVER, it finds nothing. What is going on? Why doesn't VB even recognize the existence ...

Somehow I created a Macro in a worksheet.
I created a macro in an Excel worksheet somehow. I didn't try to, it just happened. Now everytime I open that workbook, it asks me if I want to run the macro, disable it, etc. How the hell do I get rid of the macro? It doesn't show up under tools, macros. And it apparently doesn't do anything either because I can disable it and nothing different happens. Who invented this system anyway? Thanks, V When you record a macro, a module is created to store the macro code. There are instructions here for removing the module that is causing the prompt to appear: http://www.c...

Adding an "I'm out of the Office" Message
Re Outlook Express. I can't find anywhere on the index about how to send one of those "I will be out of the office from July blah blah to August blah blah." Anyone help, please? thanks-- Richard Hi - This is a group to support Outlook from the Office group of programs. Outlook Express is a part of Internet Explorer and is a quite different program, despite its similar name.. You will probably get a faster and more expert answer if you post this to an Outlook Express news group. Try posting in one of these newsgroups: microsoft.public.windows.inetexplorer.ie5.outlookexp...

Macro's with Ctrl or Ctrl-Shift?
When you record a new macro it asks you what Ctrl key you want to access it with. If you Edit the Properties of a Macro it asks you what Ctrl-Shift key you want to use to access a macro. How can you have more control over this to assign the proper key to a macro? Thanks. Al, I don't know what you mean by "edit the properties of a macro." You can assign a Ctrl or Ctrl-Shift combination (excluding number keys) to macros either when about to record a macro, or later with Tools - Macro - Macros - Options. If by "have more control," you mean keys other than C...

XL 2007: How to find out what keyboard shortcuts I've assigned to macros?
Over the years, I've recorded and written a lot of macros. (Probably time to take a week or two and go over them and delete at least half!) I assigned a keyboard shortcut to a lot of them. I seem to remember that before XL 2007, there was a keyboard organizer that I could go through and review what shortcuts I had already assigned to my macros. I can't find that in 2007, though. Is there an easy way to generate a list of all my keyboard assignments and what macros they go to? Ed I don't recall ever seeing any such keyboard organizer in 2007. Canned from a prev...

How do add another code to a current one?
I have this following code to make the rows changed based on the critea in column 16, and I need add A "Red, Yellow, Green" for status to only one column 30 at the end of the spreadsheet. How do I add another code? I keep getting an error.. Private Sub Worksheet_Change(ByVal Target As Range) Dim c As Range, clr As Long For Each c In Target.Cells If c.Column = 16 Then Select Case c.Value Case "Analyze": clr = RGB(204, 255, 255) Case "Build ": clr = RGB(204, 255, 255) Case ...

Pivot tables and Macros
I was looking to be able to manipulate (ie change selections from the drop downs, not change the fields in the table or anything)and print from a pivot table using a macro. So how do I go about doing that? When I set up a macro by recording the actions that I want to do, I always get an error message when I try to run it as a macro. What specific steps are you recording, and what error message do you get? Can you click the Debug button, and see the line of code that is causing the problem? Dust For Eyes wrote: > I was looking to be able to manipulate (ie change selections from the >...

Problem with vba code to export query result in excel
Hi, I have a access report that exports to excel with click of a button after choosing parameters. This works well. However I have to modify couple of fields to utilize formula in the export module. I am not sure how to do this. I am writing the above code which seems to cause problem. I appreciate any help to resolve this issue. Thanks. Code: If lngColumn = 12 Then xlc.Offset(0, lngColumn).Value = =([UnitPrice]*[OriginalShippedQty])/1000 End If It seems the fields UnitPrice and OrigianalShippedQty are not being recognized here Jack wrote: >Hi, >I have a acces...

Adding a button with a function on protected sheets.
How do i add a button to 'reset/clear' the data on a worksheet that is protected and uses VLookup data (from another worksheet). Everyday this table will have data chosen from combo boxes or manually entered in allowable editable fields and at the end of the day after the files is saved, I need to clear that data for use on the next day. How is this Reset button applied with allowable edit ranges, VLookup data and a protected worksheet? Thanks There's several ways to do this. 1. Instead of straight vlookups, use =IF(ISBLANK(VLOOKUP(....)),"",VLOOKUP(....)) wher...

Personal Folder Error when opening Outook 2002
When opening Outlook 2002, I receive the message that the Personal folder was not closed properly and needs to be checked. I allow the check to run, and all is fine. But this error message reappears after I close and reopen Outlook. Please Reply. thanks. ...

Code about setting Y Axes scale.
I couldn't understand the lines between 35-42, why he thought the dbMinScale after the change is the one he want. What the logic of this code section. Any one who could understand please help me. thanks in advance!:) Private Sub USP_SetYAxesScal(ByVal i_strWSName As String, ByVal i_strChartName As String, Optional ByVal i_intDecimal As Integer = 2) Dim dbMaxScale As Double, dbMinScale As Double, i As Integer, j As Integer Dim xTargetChart As Chart, vTemp() As Variant, blnInit As Boolean, dbMax As Double, dbMin As Double 1 On Error Resume Next 'get max/m...

Hide Global.xls (personal.xls) in project explorer
How do I hide VBAProject(Global.xls) in project explorer. I just want my normal project there. Helge You can't hide it, but you could give it a password: Select your project Tools|VBAProject|Protection tab Give it a memorable password At least the project won't be too intrusive. nankerp wrote: > > How do I hide VBAProject(Global.xls) in project explorer. I just want > my normal project there. > > Helge -- Dave Peterson ...

Create Excel macro for barcode output
I am looking for suggestions or samples of an Excel macro that will output barcodes that can be printed and then attached onto loan documents. Example: input loan # 555 and print off 20 barcoded labels - each label contains loan number + the document type. hi, you don't need a macro for that. we just got throught barcodeing our part numbers in the ware house and used excel and no macro. bar codes are just another font. excel uses 3 0f 9 barcode font. you can download others off the net. you can format a cell with this font and it will show as barcode on the sheet and numbers in th...

Help with a code
I have these code and it works find: but i also want to use it for different culumn within the same sheet. how do i add Column D with different target? meaning "S" for Study and "B" for books and s on... and maybe adding a Msg box to it that will only allow the Letters specify.. thank you in advance.. Private Sub Worksheet_Change(ByVal Target As Range) If Target = "" Then Exit Sub If Target.Count > 1 Then Exit Sub If Not Intersect(Target, Range("c6:c50")) Is Nothing Then If UCase(Target) = "C" Then Target = "Contribution" El...

Excel Number Format Codes
I can't figure out how to format numbers so that when you type 3220 it will look like 32.20 kinda like how you can enter numbers on an adding machine. I would greatly appreciate this number format code. Thank you. -- 1:~ Hi, I think you want to go Tools | Options | Edit | Fixed Decimals - 2. That will divide all the numbers you enter by 100. You will also have to format the row or column to display 2 decimals. Select the cells or range, right mouse click, format cells, numbers, 2 decimals. Hope that helps. Best regards, Kevin "MBB" <MBB@discussions.microsoft.com> w...

Save custom formats independantly of workbooks?
Hi, Is there a way to save several custom formats (say, numbers in $000's, in $ millions, etc) which I would use for a variety of workbooks (including workbooks where those formats do not exist yet), with a name, and make them accessible from the toolbars? Earlier today someone kindly suggested to assign a name to the format using Format -> Style, but the formats I had saved have disappeared from the style menu once I closed a spreadhseet and used a different one. Any suggestion? Many thanks, Joss Delage ...

zip code help! #2
thanks for the help !!!!!!!! It worke -- cbender ----------------------------------------------------------------------- cbender3's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1556 View this thread: http://www.excelforum.com/showthread.php?threadid=27126 ...

Zip a file from code
I have several xls files that I export from Access (2000). Can anyone provide me the code (or a web site) that I can use to zip these files into one file to be emailed? Use the shell command and winzip command line calls ( link provided ). http://www.memecode.com/docs/winzip.html "brian b" wrote: > I have several xls files that I export from Access (2000). Can anyone > provide me the code (or a web site) that I can use to zip these files into > one file to be emailed? > > This web site was shared with me on this NG. I found the code works very well. Go...

passeord Protect for excel formula and VBA code
Hi, i have excel sheet its contain lot of formula and VBA(macro) code, its for used for user purpose, i need how to protect the formula and VBA at the time of user using. kindly let me know , kindly help me out i need user password : for user can upload the data in non restriction cell, admin password : can change any thing(change power) pls help me, Please ask on the Excel board. "deen" wrote: > Hi, > > i have excel sheet its contain lot of formula and VBA(macro) code, > > its for used for user purpose, > > i need how to protect the formula and ...

Sending multiple Emails so each person does not get the list
We want to send out multiple emails to several email accounts. We dont want the accounts to see the list of accounts that the email went to. How does one do this in Outlook? In any contacts folder, Tools | Mail Merge is the best choice. --=20 Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for=20 Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx =20 "tom" <Spamblocker@ameritech.net> wrote in message = ...