Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-05-2015, 10:43 PM
excelledsoftware excelledsoftware is offline Insert formulas in VBA code Windows 8 Insert formulas in VBA code Office 2003
IT Specialist
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default

Your attached file was not saved as an xlsm so your code is not there. You can do most of the regular formulas in VBA by typing out WorksheetFunction. An example is below


Code:
val = WorksheetFunction.CountIf(range("A:A"),range("A1").value)
Its great that you are learning how to code. Another resource you can use is the macro recorder. While this bloats things quite a bit you can get the function syntax for something like inserting a column just by recording it and then looking at the code.

Let me know if this is any help at all or if you just a code snippet.

Thanks
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert formulas in VBA code VBA code for Microsoft Word macro — select text and insert footnote ndnd Word VBA 10 01-06-2015 01:47 PM
Help with IF or ELSE Formulas tsaladyga Excel 4 07-23-2014 09:04 AM
Search and replace/insert HTML code into Master File using tags dave8555 Excel 2 02-23-2014 03:51 PM
Need help with formulas please paul_pearson Excel 0 03-20-2013 06:51 AM
Insert formulas in VBA code IF Formulas mizzamzz Excel 1 07-08-2010 02:32 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:59 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft