vba

Shellexecute from Outlook

I would like to launch a URL when an email arrives in Outlook. I setup a rule and have it trigger a script function. It looks like I want to call ShellExecute to launch the URL in a browser, but when I hit this line: ShellExecute(0&, "open", URL, vbNullString, vbNullString, _ vbNormalFocus) The method is not defined. Any ideas?...

Merge the contents of 2 cells into another 3rd cell using VBA in Excel

Hi everybody, I have two cells lets say: A1 and A2 The content of each one of them is a string: A1: Hallo A2: World My goal is to merge the contents of A1 and A2 in another cell e.g. A3 i.e. A3's content should be: Hallo World I would like to do this using a VBA macro and not only for strings as contents.. Thanks both of u for y...

Problem with dynamically parsing the VBA File

I have an MS Office 2003 excel file with macro. I have to parse the VBA code in macro using c#. While parsing i have to identify whether the keyword is a method name or property. And also is there a component from Microsoft to access all the VBA functions dynamically using reflection in c#? Is there a way to do this? If so please sugg...

Uniformly link contents of cells

I have a list of systems in a big group that are considered as one. They each have an 'Assessed' status, but I want to somehow link all those systems in the group together, so that if I change the assessment status in any of them, it will update to all those in the group. Is there a way of doing this, apart from assigning one as the 'mas...

Using Excel as front end to Access database (with VBA)

I am building a small application for a friend and they'd like to be able to use Excel as the front end. (the UI will basically be userforms in Excel). They have a bunch of data in Excel that they would like to be able to query but I do not want to use excel as a database as I don't think it is fit for that purpose and am considering usi...

How can I best use VBA in Access or Excel to test an ODBC connection?

Given a pre-configured ODBC System DSN, I'd like to write a function that gracefully tests that connection using VBA. Private Function TestConnection(ByVal dsnName As String) As Boolean ' What goes here?? ' End Function Edit: To clarify, the System DSNs are pointing to external SQL Server 2005 databases, with Windows NT authenti...

How do I migrate VBA to asp.net

I have an MS-Access 2003 front end (backend SQL2000) that I want to move to asp.net. The system is too hungry bandwidth wise to run across the web/vpn. I have started manually building the aspx and ascx's, which is becoming a bit of a nightmare, and will start on the code shortly. Has anyone successfully migrated MS-Access/vba to asp.n...

Limiting autoshape movement in Excel.

Hello, This is my first question here, so try not to be harsh. I am trying to create an excel sheet, which does the following: reads information from the database through the custom defined class using the read specifications, it creates autoshapes and puts them in first sheet Is there any way to get information when someone change...

Accessing another maibox in outlook using vba

Hey! I have two mailboxes in my Outlook. One that is mine and it automatically logs me in when I log in to my pc and another I have that is for mail bounces. I really need to access the inbox of the mail's account but I just can't seem to do it. And there is no way I can make the mailbox of the mail account to be my default mailbox ...

How to create a list from beginning number and end number

I have a set of numbers: Column A: (A1)100,(A2)103,(A3)104,(A4)106 Column B: (B1)102,(B2)103,(B3)105,(B4)110 Column A is the beginning number and Column B is the end number. We need to create a list (on a separate cell) of numbers using the beginning number and end number using column A & B. E.g. based on the 1st set of data from Row...

desagree in excel

Hello, I need your help in this case: I have: 1 11 111 Cat1 a,b,c 2 22 222 Cat2 d 3 33 333 Cat3 e,f 4 44 444 Cat4 g,h,i and i want: 1 11 111 Cat1 a 1 11 111 Cat1 b 1 11 111 Cat1 c 2 22 222 Cat2 d 3 33 333 Cat3 e 3 33 333 Cat3 f 4 44...

Writing a Macro to Use the Transpose Fuction Repeatedly

I am trying move rows of values into a column in Excel. The transpose function work well, but will only move one row at a time. I would like to get a macro that will covert 173 rows of data across three columns into one column. Please see example below. Thanks in advance for any help. Rows 98,058 98,058 98,314 82,362 82,684 83,326 ...

Outlook nagging dialog about macro

Hey! I am following the code from microsoft from this page: http://support.microsoft.com/kb/306108 This is what I have: Public Sub GetMails(Item As Outlook.MailItem) MsgBox "Mail message arrived: " & Item.SenderEmailAddress MsgBox "Mail message arrived: " & Item.Subject MsgBox "Mail message arrived: " & Item.Body End Sub ...

VB/VBA: Fetch HTML string from clipboard (copied via web browser)

It seems that when you copy something from a web browser to the clipboard, at least 2 things are stored: Plain text HTML source code Then it is up to the software that you are pasting into can determine which one it wants. When pasting into MS Excel 2003, you have a paste special option to paste HTML, which will paste the formatted...

SheetBeforeDoubleClick not working from COM Addin

I'm trying to write a COM add in for Excel in C# that disables the ability to double click a cell and then edit it, I want to popup a box saying that editing a cell this way is prohibited and then stop all execution. Looking through the documentation at Microsoft this seems like a very easy task, you create an Application event AppEvent...

Import a fixed width text into Excel 2003 using VB

Hello. I have a fixed width text file and I want to automatically import certain spaces in each line into specific cells of an Excel 2003 sheet. Can you help me? I will re-phrase my question because the previous one wasn't very clear. I need to read specific characters (i.e. 12-17, 23-29) and place them inside a excel sheet. Is this po...

Disable warning: You copied a large amount of data onto the clipboard

While debugging queries written in MS Access 2007 (problem was the same in all previous versions too), I'll run the query and then copy the results into Excel. Depending on results, I switch batch to Access to refine the results and go back into design mode of the query. At this point, I get an annoying warning: you copied a large amo...

Excel + VBA: changing right click menu when clicking above autoshapes.

I am doing a little Excel + vba application and I have got stuck. I know that using Application.CommandBars("Cell").Controls.* I can change right click menu to only show specific options for specific cell (of course with additional code). But is there a way to change the menu when I click right mouse button above autoshape? I hav...

Autofiltered List; cross-row formula

I have a large Autofiltered list (~600 rows), with some of the rows being summary rows that I want to use a UDF to display the lowest priority listed in any of the 'child' cells. I can pass to my formula the right cells, but they are no longer correct if the list is re-ordered in any way. Is there a way to give the formula the right cell...

In VBA how do you return the name of an underlying query for a report object?

I would like to obtain the name of a query behind a specific report. I was hoping to do something like this... Dim QueryName As String QueryName = CurrentProject.AllReports(MyReportName).RecordSource.Name However, I know this does not work, but I would like to find a means of doing this. Is there something I am obviously overlooking...