Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Initiating the VBA program

Hi, this is a very basic question: I found a VBA program here that I think
might help solve my problem, but once I copy and paste the code into the code
window, how do I make the program run? When I create a macro, I give the
macro a keystroke combination to run, but when I create/copy a VBA program I
don't know how to start the code running once I get back to the spreadsheet.

Thanks to anyone who can help,
Dino

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Initiating the VBA program

I pasted the code into the "VBAProject (Book1) / ThisWorkbook" code window. I
did notice that I also have a "VBAProject (Personal.xlsb) / ThisWorkbook
window also available. I want this and future programs to be available on my
copy of Excel 2007 regardless of which workbook I'm in.


"Rick Rothstein" wrote:

Which code window did you copy/paste it into? Normally, you would put it
into a Module (Insert/Module from the VB menu bar), but this would require
the code to reference the worksheets that any ranges are on (otherwise the
active sheet would be used by default and that may not be what you want or
need). If you put it in a worksheet module, then that worksheet would have
to be active in order for the macro to have any unspecified ranges refer to
it. Assuming you have the code in the correct place, you can get to it by
pressing Alt+F8. After pressing Alt+F8, you can select the macro and run it
directly OR you can click the Options button on the dialog box and assign a
keystroke combination to run it from the dialog box that appears.

--
Rick (MVP - Excel)


"Dino" wrote in message
...
Hi, this is a very basic question: I found a VBA program here that I think
might help solve my problem, but once I copy and paste the code into the
code
window, how do I make the program run? When I create a macro, I give the
macro a keystroke combination to run, but when I create/copy a VBA program
I
don't know how to start the code running once I get back to the
spreadsheet.

Thanks to anyone who can help,
Dino



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Initiating the VBA program


In the Project explorer, right click and Insert a Module. Only your
macros from a Module will be in the Alt+F8 picks. Be sure to insert the
module into your Personal workbook if you want to use it for other
workbooks.


--
Kenneth Hobson
------------------------------------------------------------------------
Kenneth Hobson's Profile: http://www.thecodecage.com/forumz/member.php?userid=413
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=105822

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Initiating the VBA program

Thanks for the info.


"Kenneth Hobson" wrote:


In the Project explorer, right click and Insert a Module. Only your
macros from a Module will be in the Alt+F8 picks. Be sure to insert the
module into your Personal workbook if you want to use it for other
workbooks.


--
Kenneth Hobson
------------------------------------------------------------------------
Kenneth Hobson's Profile: http://www.thecodecage.com/forumz/member.php?userid=413
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=105822


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
Initiating the VBA program Rick Rothstein Excel Programming 0 June 11th 09 08:13 PM
Initiating the VBA program Jacob Skaria Excel Programming 0 June 11th 09 08:12 PM
Initiating the VBA program Barb Reinhardt Excel Programming 0 June 11th 09 08:09 PM
Initiating the VBA program Patrick Molloy Excel Programming 0 June 11th 09 08:05 PM
initiating a macro johnT Excel Worksheet Functions 9 April 2nd 05 03:43 PM


All times are GMT +1. The time now is 08:17 AM.

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

About Us

"It's about Microsoft Excel"