VBA Questions


Printer Orientation Control using VBA Code
I want to print excel UserForms automatically using VBA proceedures.Some should print in Portrait and others in Landscape. How can I control the printer page orientation from VBA code?

Answer Question   |  June 1, 2011  9:29 PM
VBA, VBA editor, Visual Basic, Visual Basic developers
asked by:
50 pts.

“Automation Error Invalid Advise Tags” What is an advise tag?
I have a visual basic module within Access that seems to compile fine; when I select the Debug function in the visual basic editor, I receive no errors or messages.  However, within my Access form, when I try to click the button associated with this module, I receive the error message, “Automation Error. Invalid Advise [...]

Answer Question   |  May 17, 2011  5:00 PM
Access 2007, VBA, Visual Basic
asked by:
5 pts.

How do you change user password for a separate Access database than you are working in?
I’ve built a database (Production) with user level security on it.  I also have built a smaller database (Login) so I don’t have to use Access’ login.  I’m trying to figure out if there is a way to change the user password in the Production database FROM the Login database.  I’ve been working with the following [...]

Answer Question   |  January 28, 2011  4:00 PM
Access 2003, Access 2003 Security, Access Database, VBA
asked by:
255 pts.

Unlocking VBA project using VBA code
Can i use vba code to unlock my x-cel vba project protected by password? I need to unprotect my project to add some code and then reprotect it.

Answer Question   |  December 25, 2010  3:29 PM
Excel 2003, Excel 2003 functions, Excel VBA, VBA, Visual Basic
asked by:
20 pts.

VBA to separate overlapping times
I am stuck trying to seperate overlapping times. The situation is that I have 5 devices requiring x amount of material at the differing durations. What I need to do is seperate the durations and add the demands together for the new duration, but there can be as many as 5 overlapping demands; here is [...]

Answer Question   |  December 1, 2010  5:46 PM
Excel 2007, Timestamp, VB codes, VBA
asked by:
75 pts.

VBA Excel dates
Why can I not make VBA Excel write me the date I put in the code, rather it shows always 00/01/1900 pls? See I wrote a short code that fills in the woorkbook (sheet), the date (any date) as a responce to a week number. The problem is that the code is only returning one [...]

Answer Question   |  November 15, 2010  2:59 PM
Excel workbooks, VBA, Visual Basic, Visual Basic Error Messages
asked by:
5 pts.

VBA Excel 2003 Copy and Paste
I would like to know how am i going to copy a certain range (A1:E500) in File A and paste it in a different file (File B). Then copy a new range in other sheet of File A then paste it in File B without overlapping the data I copied from the first range. Thank you [...]

Answer Question   |  November 16, 2010  4:08 PM
Excel 2003, Excel VBA, VBA, VBA EXCEL 2003
asked by:
135 pts.

Dir() Function doesn’t find .pdf files in Access 2003
I’ve used the Dir() function with VBA several times for different file formats, but for some reason it’s not working on .pdf files. Am I missing something?

Answer Question   |  January 28, 2011  10:40 PM
Access 2003, Dir() function, PDF, VBA, VBA editor, Visual Basic
asked by:
255 pts.

Add functioning checkbox or radio button in PowerPoint 2007
I have a “form” developed in PPT that different people will have to complete to then turn it into a full presentation. One part requires them to select Yes or No for impacting something. I would like a drop down for this but, I don’t know how to do VBA code. Can I do a [...]

Answer Question   |  October 18, 2010  4:01 PM
CheckBox, PowerPoint, PowerPoint 2007, VBA
asked by:
5 pts.

Printing File Dump Path in Visual basic
How do i write a macro for a PDF print file to be printed to a folder path?

Answer Question   |  October 13, 2010  5:33 AM
FIle path, Print PDF, VBA, Visual Basic, Visual Basic printing
asked by:
10 pts.

Combo Box Selection Locks Form
I have a combo box that locks/corrupts all of the controls on a Access 2003 form.  The locking symptom only seems to occur when the list index is greater than 0. The problem control may not be the combo box.  It may be one of two list boxes that are affected by the combo box’s ‘after update’ [...]

Answer Question   |  October 8, 2010  4:08 PM
Access 2003, combo box, list box, VBA
asked by:
255 pts.

Excel 2007 macros
In Excel 2007: How to make current time/date (static) populate active cell when command button is clicked?

Answer Question   |  October 14, 2010  7:41 PM
Excel 2007, Excel 2007 macros, Excel macros, Office 2007, VBA, Visual Basic
asked by:
5 pts.

SAP Macro
I have a bunch of data that i need to get out of SAP and put it into a Excel spreadsheet daily. i need to look up the hours on several different parts and operations. is it possible for me to writed a VBA program that will call a SAP macro give that macro data [...]

Answer Question   |  September 16, 2010  8:40 PM
Excel worksheets, SAP, SAP All-in-One, SAP and data management, SAP development, VBA
asked by:
5 pts.

VBA Code for adding a day 14 days after a template is opened in Word 2003
Hi, I have been asked to create a Word template (2003)that is held ona network drive and will be accessed by numerous employees as a .DOC file. The template has three date fields in the text. The three fields need to have a date that is 14 days after the template is opened as a [...]

Answer Question   |  September 16, 2010  9:43 PM
VB Code, VBA, VBA macro, Visual Basic, Word 2003, Word document template
asked by:
75 pts.

Create SQL statement in VBA Access 2007
How can I create a select Group BY SQL statement inside a VBA module? I’ve ran actions queries and they seem to take an effect in my tables but I’m having a difficult time creating a Select statement. Please display a couple of samples

Answer Question   |  August 18, 2010  5:15 AM
Access 2007, Access VBA, SQL, SQL statement, VBA, VBA Access 2007
asked by:
20 pts.

ID_NO INCREASE VBA ACCESS 2007
PLEASE TELL ME HOW TO INCREASE ID_NO THROUGH VBA CODE IN ACCESS 2007

Answer Question   |  August 6, 2010  7:44 AM
VBA, VBA Access 2007
asked by:
280 pts.

VBA Excel – paste not working
I have the following piece of code attached to my Excel worksheet:         ActiveSheet.Shapes(“Object 407″).Select         Selection.Copy         Range(“BP106″).Select         ActiveSheet.Paste The code is activated by making a choice in a drop down in the worksheet.  The worksheet is password protected but the cell BP106 is not locked. When I make a selection from the [...]

Answer Question   |  June 28, 2010  3:18 PM
Excel 2007, Excel VBA, VBA, Visual Basic for Applications
asked by:
5 pts.

Can ACCESS forms be used in EXCEL?
Can forms created in ACCESS be used in EXCEL (via VBA)

Answer Question   |  November 9, 2010  11:06 PM
Access forms, Access to Excel, excel, Microsoft Access, VBA
asked by:
5 pts.

Trouble creating SQL statement from MS Access Form
I’m creating an INSERT statement from the text fields in a form. This is a snippet: mySQL = mySQL & Combo0 & "','" & Text3 & "','" & Text5 & "','" & Text7 I am alternating the double and single quotation marks to enclose the entire statement as a single STRING while using the single [...]

Answer Question   |  May 10, 2013  9:51 PM
Access 2007, Microsoft Access, SQL, VBA, Windows Vista
asked by:
5 pts.

Calculate Business Hours
I found a VBA code that fits the program I’m trying to create but I’m having a difficult time locating the 12-1 lunch break so I can make it straight time. Listed below is the code. Function CalculateDownTime(StartTime As Date, EndTime As Date) As Double Dim Result As Double, EndDay As Date Result = 0 [...]

Answer Question   |  May 21, 2010  6:48 AM
Access 2007, Access 2007 alerts, Microsoft Access, VBA
asked by:
20 pts.