Search Results

Search found 4783 results on 192 pages for 'excel vba'.

Page 100/192 | < Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >

  • Outlook 2007 Script that sends new form email when a message is dragged and dropped into a folder

    - by Mark
    Is it possible to write a script that will allow Outlook to automatically send out a new email to a distribution list when you drag and drop and previously opened email into a specified folder? The rules only let you apply them to received and sent messages. They do not allow you to apply it to anything that is dragged and dropped after being opened. It baffles me that Novell Groupwise had this functionality but Outlook 2007 does not. If someone can assist me in writing a script/macro to provided this functionality, it would be greatly appreciated. Thank you.

    Read the article

  • OleDBDataAdapter UNPIVOT Query not working with Microsoft.ACE.OLEDB.12.0 DataSource

    - by JayT
    I am reading in an excel file with an OleDBDataAdapter. I am using a select statement to UNPIVOT the data and insert into DataSet. However, the compiler is genereating this error: {"Syntax error in FROM clause."} But the SQL Statement is correct as I have used it in other DB's Here is the code: string strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + FileName + ";Extended Properties=\"Excel 12.0 Xml;HDR=" + HDR + ";IMEX=1\""; OleDbConnection conn = new OleDbConnection(strConn); conn.Open(); string SQL = "select Packhouse, Rm, Quantity , Product " + " FROM " + " ( " + " SELECT Date,Packhouse, Rm,[FG XL], [FG L] " + " FROM [" + xlSheet + "] " + " ) Main " + " UNPIVOT " + " ( " + " Quantity FOR Product in ([FG XL], [FG L]) " + " ) Sub " + " WHERE (Date = '2010/03/08') and Quantity <> '0' and Packhouse = 'A' and Rm = '1' "; OleDbDataAdapter adapter = new OleDbDataAdapter(); adapter.SelectCommand = new OleDbCommand(SQL, conn); ds[sequencecounter] = new DataSet(); adapter.Fill(ds[sequencecounter], xlSheet); If I copy and paste the excel data into a DB, then the select query works, but the data presented to me is in excel spreadsheets. If anyone could provide help on this it will be much appreciated. Regards, J

    Read the article

  • Worksheet.Unprotect - Office Interop - Difference between 2003 and 2007

    - by sdmcnitt
    I have a .NET winforms app that automates Excel and checks for a worksheet password. The requirements are to be able to detect 1) that the protection is turned off 2) that the password is removed (protected but there is no password) 3) that the password matches the correct password from a database To meet the second requirement the program calls the Worksheet.Unprotect command with a null string, capturing the error. If error as expected, the 3rd check is made. If no error, then the Unprotect worked without a password == password was removed. The code sample below has these checks. The application can do this fine with Office 2003. I have since had my dev machine updated to Office 2007 and it no longer works as it did. When I call the Worksheet.Unprotect, Excel prompts for the password! I need to know how this should be accomplished in the new version of Excel or if there is a way to reference the old PIA. No matter what if I set a reference to Excel 11 it is replaced with the PIA for 12 in the GAC. 'return true if unprotect of worksheet does not generate an error 'all other errors will bubble up 'return false if specific error is "Password is invalid..." Try 'detect unprotected or no password If oWorksheet.ProtectContents Then 'try with no passsword and expect an error 'if no error then raise exception Dim blnRaiseException As Boolean = True Try 'oWorksheet.Unprotect(vbNullString) oWorksheet.Unprotect() Catch ex As Exception blnRaiseException = False End Try If blnRaiseException Then Throw New ExcelSheetNoPasswordException End If oWorksheet.Unprotect(strPwd) 'no error so if we get here -- success fnCheckWorksheetPwd = True 'leave as it was -- this may still cause workbook to think it is changed oWorksheet.Protect(strPwd) Else Throw New ExcelSheetNotProtectedException End If Catch COMex As System.Runtime.InteropServices.COMException 'handle error code -2146827284 If COMex.ErrorCode = -2146827284 Then 'this is the error we're looking for Else Throw End If Catch ex As Exception Throw End Try

    Read the article

  • mscomctl.ocx on my dev machine gives me problems since security patch of MS

    - by Bronzato
    I am busy on this problem since 2 days ago and hope someone can get me out of it. I have Excel 2010 (full install 944Mb) on my Windows 8 computer. It works well. But when I modify my workbook (containing a ListView version 6.0) I am not able to run it on my client's computer. I get the error: Could Not Load An Object. Not Available on This Machine. Even it works well on my dev machine. The reason is: Microsoft applied a Security Patch (near august 2012 I think) on mscomctl.ocx and my Excel 2010 installation files (downloaded not long ago) contains the new version of mscomctl.ocx. The clients using my Excel file don't apply the security patch at this moment. Se everytime I publish my Excel file to client's computers (from my dev environment), I reference the new mscomctl.ocx. That's the problem. I already try to get the old mscomctl.ocx from client's computer and copy & register it on my dev machine but then I got errors (Class not registered, ...) when I create a userform and drag a listview on it. So: mscomctl.ocx on client's machine is version 6.1.98.13 from 2008. mscomctl.ocx on my dev machine is version 6.1.98.34 from 2012. My question: Does someone have an idea how to proceed to have a usable version of mscomctl.ocx on my dev machine? Thank you very much.

    Read the article

  • how to insert excel-2003 values into SQL2005 database?

    - by vas
    Are there any rules / guidelines for DATA form XLS sheets to be inserted into SQL- DB? I have a group of Excel templates in 2005.Each concerned cell in Excel template is named. When Excel sheets are filled, saved and submitted , the values are transferred to the database. Excel sheets have names for various cells that are to b e filled by the user EX:- for the total number of Milk in the Beginning a given month , there is an Excel Cell Named "mtsBpiPTR180" Total number of Milk in the Ending a given month , there is an Excel Cell Named **"mtsEpiPTR180"** I have added 2 new cells , named "mtsBpiPTR180PA" and "mtsEpiPTR180PA". Now I try to upload the Excel File. But I AM UNABLE TO SEE MY FILLED DATA FROM "mtsBpiPTR180PA" and "mtsEpiPTR180PA" INTO THE RELATED DB/table. The above 2 are empty in the DB/table, even though I have filled them and successfully filed the Excel sheets Now no matter how much I search in the DB/stored procs i am unable to the ACTUAL STORED PROC or how the Data form Excel sheet is inserted into Tables WHERE DATA FROM XLS is inserted into DB. So was wondering:- Are there any rules / guidelines for DATA form XLS sheets to be inserted into SQL- DB?

    Read the article

  • MS Access Draw line around detail section that can grow

    - by LanguaFlash
    This really shouldn't be hard, I just can't figure out how to do it. I am making a proposal report that needs to have a border around it. The problem is to get the vertical lines on the side. I can't figure out how to get a line to grow and shrink based on the height of the detail section. I have used Crystal reports and sure wish Microsoft would learn a few things in regards to MS Access report writing! I am very comfortable with VBA so have no fears there. :-) Thanks, Jeff

    Read the article

  • Access: Data Type Mismatch using boolean function in query criteria

    - by BenV
    I have a VBA function IsValidEmail() that returns a boolean. I have a query that calls this function: Expr1: IsValidEmail([E-Mail]). When I run the query, it shows -1 for True and 0 for False. So far so good. Now I want to filter the query to only show invalid emails. I'm using the Query Designer, so I just add a value of 0 to the Criteria field. This gives me a "Data Type Mismatch" error. So does "0" (with quotes) and False. How am I supposed to specify criteria for a boolean function?

    Read the article

  • Pulling data from a text file to generate a report

    - by Edmond
    Have a program in Access, using VBA. I need to come up with an If statement to pull data from a text file. The data is a list of procedures and prices. I have to pull the prices from the text file to show in a report how much each procedure costs. ID PID M1 M2 M3 Total 1 11120390(procedure) 2 180(price) 360 180 540 1080(total Price) 3 2 1 3 6(Units sold) 4 5 200(Price) 200 600 800 1600(total price) 6 1 3 4 8(Units Sold) 7 11120390(procedure) The table in the text file is setup like this and I need to Pull the procedure number and the price of each procedure from the text file.

    Read the article

  • MS Access Force report footer to bottom of page

    - by LanguaFlash
    I am trying to make a report for a proposal. I would like to keep a professional look and always force the terms section to the bottom of the page. I could use the page footer but I only want the terms to show on the last page. My idea is somehow with VBA to set the height of a dummy group such that it forces the report footer to the bottom. The problem is that you can't explicitly set the height of a section. Anyone else out there with another idea (That works)? :-) Thanks, Jeff

    Read the article

  • Centralised/shared COM DLL, possible?

    - by vikp
    Hi, We have a system that makes a use of 3rd party COM DLL written in vba We have a centralised web application and 1-50 client machines that must reference that COM DLL in order to use our centralised web application. The COM DLL is going to be updated rapidly in the future, which means that it has to be re-installed on every machine manually. Is it possible to centralise this COM DLL somwhere on the network? Is there any other alternatives? Otherwise the maintenance overhead will be huge... Thank you

    Read the article

  • Using query parameter in Access report

    - by Dave
    I have a very basic access database where a query returns the sales made within a set start date and a set end date. The dates are set with two pop up boxes for the user to enter, first the start date, and then the end date. I have a report running off the back of this. How can I (using VBA) get at these dates then display them on the report - ie. the report says "Sales for Period:" and then shows the "from date" and the "to date" that the user input.

    Read the article

  • Inserting Rows Without Selecting Anyting?

    - by Soo
    Hello SO, I'm working in VBA and want to insert a row in a specific location without selecting it. The issue I'm having is that after the row is selected, the spreadsheet is scrolled down to that row when the script is finished running. I want to be able to do this without the spreadsheet being scrolled down to the inserted row. Rows(i & ":" & i).Select ActiveCell.EntireRow.Insert I don't want to select A1 to get to the top.

    Read the article

  • How to code an ALL option into a Combo Box

    - by Edmond
    I have a combo box on my form with the choice of choosing organization 10, 20, 30.... I have added ALL to the combo list box, but am having trouble implementing an all statement in VBA. Below is the case statement I have to get info from organizations 10, 20, 30. How do I get ALL to generate?? Case Is = 1 If cboOrg.ListIndex < 0 Then Call msg("Please select your organization!") Exit Sub End If sQ = sQ & " CC LIKE '" & cboOrg.Value & "*'" ORGCC = Trim(cboOrg.Value)

    Read the article

  • wanting to move up from ms access, thinking .net? visual studio?

    - by Tristan Lear
    So I wrote a project-management program for a small business using Microsoft Access 2007. Now they've requested lots of additional features (timekeeping, privileged data tiers ...) I personally use Linux, but the whole office uses Windows. I'm relatively new to programming but like to teach myself using projects like this. I'm right on the edge on this -- I can't really tell what the path of least resistance here is: do I stay in access + VBA and teach myself a dying, annoying language -- while struggling against all the limitations of Access? Or do I move to something else? Python seems simple enough ... Whatever I use, i need to be able to offer a GUI.

    Read the article

  • getting the heading of a selected text in word

    - by Thunder
    Hi, I am working With Microsoft Word VBA,macros. My question : Is there way to get sub-topic and master-topic that precedes a selected body text ? Here is an example: Master topic (level 1) sub-topic 1 (level 2) body text a body text b body text c sub-topic 2 (level 2) body text d body text e Other MISC topics (level 2) body text f body text g body text h Here if 'bodytext e' is selected I would like to run a macro and get the result as 'Master topic:sub-topic 1' I have tried with range,parent ,Scope.Information(wdActiveEndSectionNumber) etc but nothing seem to work!!! Thanks in Advance

    Read the article

  • Counting characters in an Access database column using SQL

    - by jzr
    I have the following table col1 col2 col3 col4 ==== ==== ==== ===== 1233 4566 ABCD CDEF 1233 4566 ACD1 CDEF 1233 4566 D1AF CDEF I need to count the characters in col3, so from the data in the previous table it would be: char count ==== ===== A 3 B 1 C 2 D 3 F 1 1 2 Is this possible to achieve by using SQL only? At the moment I am thinking of passing a parameter in to SQL query and count the characters one by one and then sum, however I did not start the VBA part yet, and frankly wouldn't want to do that. This is my query at the moment: PARAMETERS X Long; SELECT First(Mid(TABLE.col3,X,1)) AS [col3 Field], Count(Mid(TABLE.col3,X,1)) AS Dcount FROM TEST GROUP BY Mid(TABLE.col3,X,1) HAVING (((Count(Mid([TABLE].[col3],[X],1)))>=1)); Ideas and help are much appreciated, as I don't usually work with Access and SQL.

    Read the article

  • MS Access "#Name?" in unbound field on SOME machines

    - by alkorya
    I have a datasheet form bound to table. I added 2 unbound fields and set their Control Source properties to user defined VBA functions: 1. ConcatRelated (http://allenbrowne.com/func-concat.html) 2. Custom function that returns a string: Public Function GetLowestSatatus(LookupField As String, JSAID As Integer) As String On Error Resume Next GetLowestSatatus = DLookup(LookupField, "JsaStatuses", "ID=" & DMin("StatusID", "Tasks", "JSAID =" & JSAID)) End Function It works fine on my and some other machines but there are machines I got "#Name?" in these 2 unbound fields. All machines configured identically. Any ideas? Thank you!

    Read the article

  • Repurpose builtin Word commands - access original command within repurposed function

    - by Aurril
    It is possible to repurpose a Word builtin command in Word 2007 using the customUI.xml file. Example: <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"> <commands> <command idMso="Save" onAction="MySave"/> </commands> </customUI> I then have to define a callback function in VBA which is used instead of the builtin function: 'Callback for Save onAction Sub MySave(control As IRibbonControl, ByRef cancelDefault) someFancyPreparationFunction oldSaveFunction ' Where, how? someOtherFancyAfterWorkFunction End Sub And here is my problem, if I want to reuse internal functionality in my repurposed Function, I don't know how to access it. My example is trivial and the save could be easily rebuilt by a call to ThisDocument.save but as I said, it is just an example to show the problem. A call to CommandBars.ExecuteMso('Save') would call my repurposed function and not the original one. Any ideas on how to access the internal functionality after repurposing would be very appreciated!

    Read the article

  • Inserting new argument to table through search form of another table

    - by owca
    In my database I have a form for searching products (fields : id, name, manufacturer_id[set to display manufacturer's name], category_id, price). I would like to have the ability of adding manufacturers through this form. So I've created vba script but it does not work. Still when I enter new name it gives me prompt to "Select element from the list". What am I doing wrong ? Private Sub manufacturer_id_NotInTheList(NewData As String, Response As Integer) Dim strSQL As String, strInfo As String strInfo = "Manufacturer " & NewData & " is not on the list." & vbCrLf & "Add?" If MsgBox(strInfo, vbYesNo + vbQuestion, "Element not on the list") = vbYes Then strSQL = "INSERT INTO manufacturer (name, country, id_distributor) VALUES ('" & NewData & "','Undefined', '0');" DoCmd.SetWarnings (False) DoCmd.RunSQL strSQL Response = acDataErrAdded Else Response = acDataErrContinue NewData = "" Me.manufacturer_id.Text = "" End If End Sub

    Read the article

  • How can I convert a decimal to a fraction ?

    - by CornyD
    How do I convert a indefinite decimal (i.e. .333333333...) to a string fraction representation (i.e. "1/3"). I am using VBA and the following is the code I used (i get an overflow error at the line "b = a Mod b": Function GetFraction(ByVal Num As Double) As String If Num = 0# Then GetFraction = "None" Else Dim WholeNumber As Integer Dim DecimalNumber As Double Dim Numerator As Double Dim Denomenator As Double Dim a, b, t As Double WholeNumber = Fix(Num) DecimalNumber = Num - Fix(Num) Numerator = DecimalNumber * 10 ^ (Len(CStr(DecimalNumber)) - 2) Denomenator = 10 ^ (Len(CStr(DecimalNumber)) - 2) If Numerator = 0 Then GetFraction = WholeNumber Else a = Numerator b = Denomenator t = 0 While b <> 0 t = b b = a Mod b a = t Wend If WholeNumber = 0 Then GetFraction = CStr(Numerator / a) & "/" & CStr(Denomenator / a) Else GetFraction = CStr(WholeNumber) & " " & CStr(Numerator / a) & "/" & CStr(Denomenator / a) End If End If End If End Function

    Read the article

  • if exists, update, else insert new record

    - by I__
    i am inserting values into a table if the record exists already replace it, and if it does not exist then add a new one. so far i have this code: INSERT INTO table_name VALUES (value1, value2, value3,...) where pk="some_id"; but i need something like this if not pk="some_id" exists then INSERT INTO table_name VALUES (value1, value2, value3,...) where pk="some_id"; else update table_name where pk="some_id" what would be the correct SQL syntax for this? please note that i am using sql access and that i guess it can be a combination of vba and sql

    Read the article

  • converting tabular structures in a Word document into an actual table or reading data from the tabul

    - by Chris
    I have a macro which can read the last cell/column of all tables in a Word 2003/2007 document and store the data in an MS-Access table. But, some Word documents have the data in structures like a table format but are not actually tables. The structure looks like a table, but the table borders are actually line connectors. These documents were created by a software(VeryPDF PDF to Word converter) which converted the PDF documents(the original format these documents were) into Word documents. Is there a way I can convert/replace the tabular structures with actual tables in Word so that I can use the macro? Or, is there a way I can read the value of the last column from the tabular structures using some VBA code? Any advice would be appreciated.

    Read the article

  • How do I load every UserForm without having to call .Show individually?

    - by Daniel Cook
    I wanted to figure out how you could load every UserForm without having to call Userform1.Show UserForm2.Show etc. This was inspired by comments on this answer: Excel VBA UserForm_Initialize() in Module. I found this method suggested in a few places: Sub OpenAllUserForms() Dim uf As UserForm For Each uf In UserForms uf.Show Next End Sub However, no Userforms display regardless of how many are attached to the workbook. When I stepped through the code I determined that the UserForms collection is empty! How can I load each Userform without having to explicitly show each one?

    Read the article

  • Activate first workbook after closing second one?

    - by user1830217
    Open workbook A. Code in A opens workbook B. B is now the active WB. Code in B ends with ThisWorkBook.Close B closes, so A appears. Problem is, I can't get ANY Activate events in WB A to fire automatically after WB B closes. But if I close WB B manually, using mouse to 'x' out the WB, or via the menus, then WB A triggers Activate events. Somehow using VBA to close WB B prevents WB A Activate events from triggering. Same results in Excel 97 and 2003 Am I missing something, or is there a workaround?? Thanks! John

    Read the article

< Previous Page | 96 97 98 99 100 101 102 103 104 105 106 107  | Next Page >