Actuarial Outpost
 
Go Back   Actuarial Outpost > Actuarial Discussion Forum > Software & Technology
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions


View Poll Results: What is the best way to learn VBA?
Book 109 35.97%
Help 48 15.84%
Internet 152 50.17%
Macro Recorder 115 37.95%
Multiple Choice Poll. Voters: 303. You may not vote on this poll

Reply
 
Thread Tools Search this Thread Display Modes
  #121  
Old 06-10-2015, 12:08 PM
Childish Gambino's Avatar
Childish Gambino Childish Gambino is offline
Member
SOA
 
Join Date: Jul 2014
Posts: 24,800
Default

don't you hate it when you need to use a macro that you wrote before but you can't find that macro?

i have no clue where or why i would have done this but i know i did dammit
__________________
Quote:
Originally Posted by Donald J Trump
I was going to fire Comey knowing, there was no good time to do it. And in fact when I decided to just do it, I said to myself, I said you know, this Russia thing with Trump and Russia is a made up story
Reply With Quote
  #122  
Old 06-10-2015, 01:57 PM
campbell's Avatar
campbell campbell is offline
Mary Pat Campbell
SOA AAA
 
Join Date: Nov 2003
Location: NY
Studying for duolingo and coursera
Favorite beer: Murphy's Irish Stout
Posts: 83,767
Blog Entries: 6
Default

Quote:
Originally Posted by Childish Gambino View Post
don't you hate it when you need to use a macro that you wrote before but you can't find that macro?

i have no clue where or why i would have done this but i know i did dammit
Sometimes I email the code from macros to myself

and then search in my email

[i find it a lot easier to search gmail than search my files]
__________________
It's STUMP

LinkedIn Profile
Reply With Quote
  #123  
Old 06-10-2015, 07:43 PM
JMO's Avatar
JMO JMO is offline
Carol Marler
Non-Actuary
 
Join Date: Sep 2001
Location: Back home again in Indiana
Studying for Nothing actuarial.
Posts: 37,428
Default

Quote:
Originally Posted by campbell View Post
Sometimes I email the code from macros to myself

and then search in my email

[i find it a lot easier to search gmail than search my files]
Or you could create a "Macro Watch" thread on the AO.
__________________
Carol Marler, "Just My Opinion"

Pluto is no longer a planet and I am no longer an actuary. Please take my opinions as non-actuarial.


My latest favorite quotes, updated Apr 5, 2018.

Spoiler:
I should keep these four permanently.
Quote:
Originally Posted by rekrap View Post
JMO is right
Quote:
Originally Posted by campbell View Post
I agree with JMO.
Quote:
Originally Posted by Westley View Post
And def agree w/ JMO.
Quote:
Originally Posted by MG View Post
This. And everything else JMO wrote.
And this all purpose permanent quote:
Quote:
Originally Posted by Dr T Non-Fan View Post
Yup, it is always someone else's fault.
MORE:
All purpose response for careers forum:
Quote:
Originally Posted by DoctorNo View Post
Depends upon the employer and the situation.
Quote:
Originally Posted by Sredni Vashtar View Post
I feel like ERM is 90% buzzwords, and that the underlying agenda is to make sure at least one of your Corporate Officers is not dumb.
Reply With Quote
  #124  
Old 06-10-2015, 09:31 PM
campbell's Avatar
campbell campbell is offline
Mary Pat Campbell
SOA AAA
 
Join Date: Nov 2003
Location: NY
Studying for duolingo and coursera
Favorite beer: Murphy's Irish Stout
Posts: 83,767
Blog Entries: 6
Default

no.
__________________
It's STUMP

LinkedIn Profile
Reply With Quote
  #125  
Old 06-22-2015, 03:05 PM
Actinium ad Infinitum's Avatar
Actinium ad Infinitum Actinium ad Infinitum is offline
SOA AAA
 
Join Date: Jun 2015
Location: US
Favorite beer: Coffee 24x7
Posts: 13
Default

To really learn any language, you need to spend a ton of hours developing code. But, the best way to get started is to check out some free online tutorials.
Reply With Quote
  #126  
Old 06-22-2015, 03:13 PM
Actinium ad Infinitum's Avatar
Actinium ad Infinitum Actinium ad Infinitum is offline
SOA AAA
 
Join Date: Jun 2015
Location: US
Favorite beer: Coffee 24x7
Posts: 13
Post

Include the following on the first line of your VBA code module:

Option Explicit

This will save you lots of trouble and headaches.

Last edited by Actinium ad Infinitum; 06-22-2015 at 03:17 PM..
Reply With Quote
  #127  
Old 06-22-2015, 03:57 PM
Fracktuary Fracktuary is offline
Member
CAS
 
Join Date: Aug 2012
Posts: 1,779
Default

Quote:
Originally Posted by Actinium ad Infinitum View Post
Include the following on the first line of your VBA code module:

Option Explicit

This will save you lots of trouble and headaches.
Get Visual Studio if you dont need the excel functionality.
Reply With Quote
  #128  
Old 06-28-2015, 02:54 AM
Actinium ad Infinitum's Avatar
Actinium ad Infinitum Actinium ad Infinitum is offline
SOA AAA
 
Join Date: Jun 2015
Location: US
Favorite beer: Coffee 24x7
Posts: 13
Default SQL in vba

Try to get most calculations out of Excel as Excel is slow. If dealing with many rows or lots of data, do the heavy lifting in a data base via SQL strings and odbc connections. Can typically access the MS Access DB engine (i.e., jet). I use Excel as a user platform to access and create databases in my vba applications.
Reply With Quote
  #129  
Old 07-26-2015, 11:26 PM
actuary21c actuary21c is offline
Member
 
Join Date: Sep 2009
Location: UK
Studying for double bass & jazz piano
Posts: 1,786
Default Set "Require Variable Declaration" to ticked in Tools, Options in VBA window

Quote:
Originally Posted by Actinium ad Infinitum View Post
Include the following on the first line of your VBA code module:

Option Explicit

This will save you lots of trouble and headaches.
Better (because it saves you having to remember to type Option Explicit at the top of each of your code modules):

In the VBA window, from the menu, Tools, Options, on the Editor tab, make sure that "Require Variable Declaration" is ticked. (It should be ticked by default, but it isn't - a bug in Excel VBA in my view).
If you have that ticked, the Option Explicit line will be added automatically to any *new* modules or class modules you create (but NOT for any of existing modules you created before the change to the Options - unless Microsoft have improved things recently, you'll have to go back and add the line manually to those).
__________________
Spoiler:

Quote:
Originally Posted by Brock View Post
a21c is one of the better posters on the AO. That's not saying he's good.

UK software developer, actuary, musician, atheist. All posts in a personal capacity (unless explicitly stated otherwise in the post).
Reply With Quote
  #130  
Old 07-27-2015, 05:52 AM
campbell's Avatar
campbell campbell is offline
Mary Pat Campbell
SOA AAA
 
Join Date: Nov 2003
Location: NY
Studying for duolingo and coursera
Favorite beer: Murphy's Irish Stout
Posts: 83,767
Blog Entries: 6
Default

Quote:
Originally Posted by actuary21c View Post
Better (because it saves you having to remember to type Option Explicit at the top of each of your code modules):

In the VBA window, from the menu, Tools, Options, on the Editor tab, make sure that "Require Variable Declaration" is ticked. (It should be ticked by default, but it isn't - a bug in Excel VBA in my view).
If you have that ticked, the Option Explicit line will be added automatically to any *new* modules or class modules you create (but NOT for any of existing modules you created before the change to the Options - unless Microsoft have improved things recently, you'll have to go back and add the line manually to those).
I require my students to do that when we start the VBA section.
__________________
It's STUMP

LinkedIn Profile
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 08:47 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
*PLEASE NOTE: Posts are not checked for accuracy, and do not
represent the views of the Actuarial Outpost or its sponsors.
Page generated in 0.31847 seconds with 10 queries