vba

VBA named range offset

Hi I am trying to write VBA code that will select a named range, copy it and paste it for a certain number of rows. What I need to know is how to select the range of cells corresponding to the ones above. E.g. I have a range "myRange" which refers to: "=$A$1:D$1$,$F$1,$K$1". I want to copy this and paste it in "=$A$2:D$2$,$F$2,$K$2" by...

Input Mask without Year for date

Could anyone help me in inserting a input mask formula for date in a access form textbox that shouldnot take year which only take date and month in the below format : DD/MM Not in DD/MM/YY Thanks for help in advance ...

vb code for excel-2007 format->recolor->set transparent color

hi can you show a vb code for excel-2007 format->recolor->set transparent color on an a image inserted... by the way, forgot to mention that excel-2007 record macro does not record this stuff otherwise i would not ask it here... :) ...

How to use VBA to move a page within a PDF document

Using MS Access, I need to open a PDF file, move the last page of the file to the first, and save it. But the error (see below) keeps getting in my way. (I'm good with VBA, but this is my first attempt at manipulating PDF with VBA). Note: I'm using AcroRd32.DLL Option Compare Database Option Explicit Sub x() Dim PDFdoc As...

Accessing Field2 in Access 2007

I'm trying to write a simple little routine to email an attachment stored in an Access 2007 database. For some reason I cannot get the simplest part of it to work. I get an error saying "User-defined type not defined" on the following line: Dim attachmentField As DAO.Field2 Now up to this point I haven't accessed any DAO objects yet,...

MS-Access 2003 - Expression in a Text Box on a form

just wondering when using an expression on a form in a text box, to return a value from a table, can the expression have multiple tables in the expression to return the value? the tables are linked and I can return the value in a query, so I figured that Access would be able to do it with this method as well???? =DSum("[tblMain]![Reve...

VBA for altering PowerPoint 2003 Presentations- Active not new

If I set up a template on PowerPoint slides, that contain all the text boxes I need, the what Visual Basic do I use to enter text that I want into those text boxes? It is easier for me to use a template, because these ppt briefs contain (or need to contain) a lot of data: how do I enter text into those text boxes how do you alter the ...

Strange field assignment issue in DAO with Access 2007

This is a follow-up on my previous question. Once I got the problem with the reference sorted out, I ran into another pretty strange issue. Basically, I have the following behind a button on a form: Dim attachmentField As DAO.Field2 attachmentField = Recordset("Att") I have now linked the reference, placed a break point on the secon...

MS Office Add On

Hi, I want to add on certain feature in MS Office. Currently, I am looking at VBA to develop it. However, it seems that running macros requires security disabled. This means that if I distribute the VBA program, other people need to enable macros to run. (Security issues) The problem now is, how do I distribute the VBA that I wrote? E....

MS access table as centralised location for storing data

Is it possible to make my MS access tables as a centralised location for storing data I have an mdb access file to store data into a table using a form. Is it possible to enter data to a centralised location? this mdb file copies are used by five user at same time Please help ! ...

Query after splitting access database

I have splitted my ms access mdb file into front end and backend Now i have the backend in the shared folder and frontends in users PC i havent specified the network path anywhere in the front end to push data to the backend file Could anyone tell me where i have to specify network path ??? ...

Validation in text box vba

i have vba textbox where i can take the validation which should only take number and accept UPTO 8 character length how can i put a validation which will take only this? ...

Find all controls on msform from c#

I'm trying to find all controls on msform from c# using VBA extensibility interop. I can find all forms using : using System; using Microsoft.Office.Interop.Excel using Microsoft.Vbe.Interop; using Microsoft.Vbe.Interop.Forms; ..... foreach (Microsoft.Vbe.Interop.VBComponent mycom in wb.VBProject.VBComponents) { ...

Refresh display of Range when ScreenUpdating is False

Hi Is there a way to refresh the display of only a specified range of cells from VBA, when ScreenUpdating = False? What I mean is the following: Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Range("A1").Calculate Range("A1").SomeFunctionThatRefreshesThis ... Karl ...

VBA Programming in Excel

I am new to programming in Excel. I have done very little Visual Basic. What I would like to do is check a column on one sheet in Excel and compare all the values to a column in a different sheet in Excel. Now the problem is, is it possible that when i click on one of the cells it is "linked" to the other and takes me to the matching cel...

Pass parameter to Outlook Script

I am trying to run a script on a outlook email message. I want to be able to pass a parameter to the VB script. I was trying to make the script do different things based on which outlook folder the message was moved to. But in the outlook rules the "Run a script" seems to always be the first action that is performed. So when the script r...

Referencing variable workbooks in Excel using VBA

Hello, I have a scenario where a user creates a workbook, then this workbook (let's call it A) is assigned a variable. Later on down the line, the user creates a second workbook (let's call it B), which is assigned another variable. The names of these workbooks are not fixed, thus they are always variables. Now I want to do a VLOOKUP...

MS Access 2003 - Importing a Text File into MS Access Database Table

At work we have this reporting tool. It is distributed to everyone as a MDE tool that is locked up pretty good (VBA is unviewable, cannot import any of the table, query, forms, etc). When each person fills out their applicable portion there is a button that conslidates it into a text file, and then sends it to Outlook. Then everyone emai...

How to create Linked textbox in worksheet?

I want to have a textbox or a caption in an excel worksheet, that displays the value of some cell from this worksheet. Is it possible? ...

Record locking in vba

i have a VBA application which is spitted into two one for front end; and backend while updating how to prevent two users edit it ?? ...