vba

MS Access 2003 - Concatenating Field Types of Same ID on a Form

Ok so a guy at work has a little access database he uses to keep track of things. He has this form that he uses that already queries what he needs and produces the results on a form and that is really all he needs. One thing is that he has duplicates for every record that comes up with a different "Type" as a field "indentifier" (what I...

Function for detecting duplicates in Excel sheet

Hi Guys, I need a function that can detect duplicates in a specified Excel column. I have this one but it does not work properly. It cannot distinguish between the value "46.500" and the value "46.5000". The countif function probably compares cells as numbers. These cells are formatted as text and I have even tried to add an apostrophe ...

Create an external table in access with outlook contacts programmatically

I'm not sure if this is possible, but i would like to create an external table in access with outlook contacts programmatically. I've searched in the Microsoft Access object model, but couldn't find a method or property that enables you to do so. I need this for synchronizing contact persons between outlook and an application I'm buildi...

After Me.Recalc in Access off-screen values are not displayed

Hi, From VBA I'm setting a series of text boxes to have DSum controlSources: Me.Oct.ControlSource = "=DSum('GBPValue', _ 'MF YTD Actual Income & Adret', _ 'Month=10 AND Org_Type=[Key]')" Me.Nov.ControlSource = "=DSum('GBPValue', _ 'MF YTD Act...

vba code for excel - to encoding gibrish to hebrew

i have files that open with excel. when i open the file the text is like gibrish. i need to encode - tools-internet option - general-encode - hebrew iso-visual and then the file turn to hebrew there is a vba code that do that ? thanks, omri ...

Word VBA Section break character in

How can you detect if the selection you have contains or is the section break character? At the moment I select a page , collapse to the end , I want to know if the end of the page contains a section break or not. I was going to use a method where I compare the section number at the end of the page , then move two characters forward , ...

Microsoft Access Disable User Input for Automation

Is there a known way, direct or workaround, by which I can disable ms access 2003 asking for user input. I have a method in which I can call a VBA procedure and I run this with a scheduled task when everyone is out of the database at around 6:30 AM. Yet I found an error in one of my queries where a space wasn't present and access was ask...

Access 2007 Setting Field to Selection in Dialog

I would like to set a field to a value selected from a grid in a dialog. I am using Access 2007. In WinForms I would: Create a child form create a grid for the data add a property for the selected item In the parent form add a button to open the form on successful dialog result get the selected item from the property update the ob...

vba "IN" operator

How best can one imitate the "IN" operator in VBA for excel? eg if X in (1,2,3) then instead of: if x=1 or x=2 or x=3 then ??? ...

Why can I not delete this pesky Drop Down from a Sheet in Excel?

I am trying to delete a drop down from a spreadsheet using the following code: Dim objShape As Shape For Each objShape In ActiveSheet.Shapes objShape.Delete Next But objShape returns Application-Defined or Object-Defined Error: Debug.Print objShape.FormControlType returns xlDropDown Debug.Print objShape.Name                      ...

How do I convert a stdole.StdPicture to a different Type?

To receive the bounty, please provide an answer with working code. Thanks. I have a stdole.StdPicture Object of the Type vbPicTypeIcon. I need to convert it to Type vbPicTypeBitmap. Due to project contraints, I need to be able to do this using Win32 or VBA. I am trying to load a file's icon to a command bar button. Here is what I have s...

MS Access 2003 - Information from a form output to a text file

So I have this form that has tons of text boxes, combo boxes, etc. There is VB in the form's module that check to see if there are duplicates, and then run a few update queries to save the information in to tables. All that works great. My question is what VB method can I use in this forms module to take information from all these objec...

Outlook recurring task trigger macro suppress

I'm using a recurring task to trigger a macro in Outlook, using the Application_Reminder hook. However when the task fires, I want to suppress the Reminder dialog box which normally appears (where there are Dismiss/Snooze etc buttons). Is there a way to do this? Have tried Item.ReminderTime = DateAdd("h", 1, Now) which does work, bu...

Excel VBA Macro Conditional Formatting By Referencing Cell Pair Relative Location

Hi Everyone, I am trying to use conditional formatting to highlight a row of cells containing key value pairs in another column when certain watch cells are yellow. I have a three columns (A,B,C) containing numeric digits and then two columns (key 1, key2) that is also numeric. Next to the two columns are sensor attribute data that is ...

Word VBA - Find text between delimiters and convert to lower case

I would like to find text which is between the < and > characters, and then turn any found text into "normal" case, where first letter of word is capitalized. Here is what I have thus far: Function findTextBetweenCarots() As String Dim strText As String With Selection .Find.Text = "<" ' what about <[^0-9]+> ? .Find.Forward =...

Open multiple copies of Word template document using VBA for applications

I am developing a database application where users open a Word template document and merge this with database records. I have successfully written code that does this for one record where I open a template file and replace items in the template document with DB data. I have tried opening the template document multiple times (once for eac...

MS Access 2003 - Question about extracting information from ppt slides

Just wondering: If I have a ppt slides that I want to extract information out of, and I set up the template for all these slides that are used by various people through out the organization, and I know all the "names" to each text box object, can I use some vb to pull that information out of the ppt slides into an access database? I k...

Mapping a "Name" to an Range

I setup a "Name" to a column range, and I want to reference it later on: Dim r As Range r = Application.Names("Changes").Something I've tried a bunch of "Something" but cannot get this right. Thanks. ...

VBA - Connect Excel 2007 Spreadsheet to Access 2007 Database via ADODB

Currently there is a Excel 2002 spreadsheet writing/retrieving data from a Access 2002 database. IT is presently researching a upgrade to Office 2007 and when I upgrade both the spreadsheet and database the ADODB connection fails. The 2002 era VBA connection string is: Provider=Microsoft.Jet.OLEDB.4.0; Jet OLEDB:Database Password = st...

Simple SQL query in Access fails with a missing semicolon error.

So, I'm learning Access 2007, Visual Basic, and SQL at the same time. Not ideal. I have this code attached to a button in a standard wizard-generated interface. I'm trying to copy a line from tblA to tblB. Every time the code is executed I get the message, "Run-time error '3137' Missing semicolon (;) at end of SQL statement." I'm guess...