Search Results

Search found 1188 results on 48 pages for 'vba'.

Page 38/48 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • runtime error "out of memory"+excel macro

    - by user356180
    hi experts. i have one macro,which i called when cell change. this macro select images and delete them and insert another image depending on cell value using following code. i have same code for two sheets. Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveSheet.Shapes.SelectAll Selection.Delete 'insert image code here. End Sub in one sheet its working perfectly fine and delete all images while in other sheet , it give me runtime error "out of memory" and highlight following line. ActiveSheet.Shapes.SelectAll can any one tell me why this is happening? it works perfectly fine in one and not in other. one other thing i want to tell you is. it was working fine when i gave this macro excel to my client,both sheets were working fine, suddenly after 2 days, he started getting error on one sheet on which he was working lot. dont know why this is happening. can anyone tell me whats reason and how to solved it?

    Read the article

  • Runtime Error: "Out of Memory" From Excel Macro

    - by user356180
    I have one macro, which is called when a cell change occurs. This macro selects images, deletes them, and inserts another image depending on a cell value using the following code. I have the same code for two sheets. Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveSheet.Shapes.SelectAll Selection.Delete 'insert image code here. End Sub In one sheet, it's working perfectly fine and deletes all images, while in the other sheet, it gives me the runtime error "Out of Memory" and highlights the following line: ActiveSheet.Shapes.SelectAll Can anyone tell me why this is happening? It works perfectly fine in one and not in the other. One other thing I want to tell you is it was working fine when I gave this Excel macro to my client; both sheets were working fine. Suddenly after 2 days, he started getting the error on one sheet on which he was working a lot. I don't know why this is happening. Can anyone tell me what's the reason for this and how I can solve it?

    Read the article

  • percentage formula in crystal report 8.5

    - by sathik
    am doing one project using vb6.0+access+crystal report8.5 some error occur during the crystal report. Query Name seqquery: SELECT segment_trans.division_name, sum(segment_trans.Total_value) AS total, division_master.Target FROM segment_trans, division_master GROUP BY segment_trans.division_name, division_master.Target; crystal report percentage formula: {(seqquery.total * 100) / seqquery.Target } Error: This field name is not known. note: Total_value and Target field's datatype "Text" how to solve this ? please help me. Thanks Sathik

    Read the article

  • How do I create a query which displays dots (....) after a certain number of characters within the field

    - by Marchese Il Chihuahua
    I would like to create a query on a field which after a certain number of characters adds/displays a number of dots to show the user that there is additional text to read. At the moment there is a syntax error using the following code in which it doesn't like the "Left" instruction: X:IIF(len(description) > 5, Left(description, 5) & "....", description) Note: "X" is what i am naming the field 'description' in my query screen in Access

    Read the article

  • excel:mysql: rs.Update not working

    - by every_answer_gets_a_point
    i am updating a table using an ODBC connection from excel to mysql unfortunately the only column that gets updated is this one: .Fields("instrument") = "NA" where i am assigning variables to .Fields, it is putting NULL values!! what is going on here? here's the code Option Explicit Dim oConn As ADODB.Connection Private Sub ConnectDB() Set oConn = New ADODB.Connection oConn.Open "DRIVER={MySQL ODBC 5.1 Driver};" & _ "SERVER=localhost;" & _ "DATABASE=employees;" & _ "USER=root;" & _ "PASSWORD=pas;" & _ "Option=3" End Sub Function esc(txt As String) esc = Trim(Replace(txt, "'", "\'")) End Function Private Sub InsertData() Dim dpath, atime, rtime, lcalib, aname, rname, bstate, instrument As String Dim rs As ADODB.Recordset Set rs = New ADODB.Recordset ConnectDB With wsBooks rs.Open "batchinfo", oConn, adOpenKeyset, adLockOptimistic, adCmdTable Worksheets.Item("Report 1").Select dpath = Trim(Range("B2").Text) atime = Trim(Range("B3").Text) rtime = Trim(Range("B4").Text) lcalib = Trim(Range("B5").Text) aname = Trim(Range("B6").Text) rname = Trim(Range("B7").Text) bstate = Trim(Range("B8").Text) ' instrument = GetInstrFromXML(wbBook.FullName) With rs .AddNew ' create a new record ' add values to each field in the record .Fields("datapath") = dpath .Fields("analysistime") = atime .Fields("reporttime") = rtime .Fields("lastcalib") = lcalib .Fields("analystname") = aname .Fields("reportname") = rname .Fields("batchstate") = bstate .Fields("instrument") = "NA" .Update ' stores the new record End With ' get the last id Set rs = oConn.Execute("SELECT @@identity", , adCmdText) 'MsgBox capture_id rs.Close Set rs = Nothing End With End Sub

    Read the article

  • difference between cn.execute and rs.update?

    - by every_answer_gets_a_point
    i am connecting to mysql from excel using odbc. the following illustrates how i am updating the rs With rs .AddNew ' create a new record ' add values to each field in the record .Fields("datapath") = dpath .Fields("analysistime") = atime .Fields("reporttime") = rtime .Fields("lastcalib") = lcalib .Fields("analystname") = aname .Fields("reportname") = rname .Fields("batchstate") = "bstate" .Fields("instrument") = "NA" .Update ' stores the new record End With the question is why is there a need to run cn.execute after this? havent i already updated the rs with rs.update?

    Read the article

  • Do sfSubForm.fForm.RecordSource and Forms(fForm).RecordSource refer to the same object and property?

    - by Raymond Rosalind
    Hi, this has me pretty confused and I can't find the answer anywhere else so thought I'd post here to see if anyone can help! I have a form in an Access 2007 database with a subform (sfSubform) embedded in it. The subform control's SourceObject is set to be another form (fForm). fForm's RecordSource starts out as a table. At one point I want to change the data displayed in the subform to the result of a SQL statement, so I use sfSubform.Form.RecordSource = strSQL. This works fine. However, if I ouput the name of the RecordSource for fForm after making this change, it still gives the name of the table that I orginially set. Does sfSubform.Form.RecordSource not change the source of fForm? Is it a copy of fForm that is embedded in the control? Hope all that makes sense.

    Read the article

  • Merge two excel files (with the condition)

    - by chennai
    I have a form in access in which i have two text boxes which accepts two excel files with a button click. now when i click generate button an output excel file has to be generated or created based on the following conditions In one excel file i have these data : id code country count t100 gb123 india 3123 t100 gh125 UK 1258 t123 ytr15 USA 1111 t123 gb123 Germany 100 t145 gh575 india 99 t458 yt777 USA 90 In another excel file i have these data country location India delhi UK london USA wallstreet Germany frankfurt The rows can be more than what i mentioned here ... now i want to merge them according to the country. In book1 excel file for example wherever you find country india the location field delhi has to be inserted right beside the country field and it has to be done for each and every country which i mentioned in book2 excel file and the output file has to be sorted according to the count at last. For example the output file should like this id code country count Location t100 gb123 india 3123 delhi t100 gh125 UK 1258 london t123 ytr15 USA 1111 wallstreet t123 gb123 Germany 100 frankfrt t145 gh575 india 99 delhi t458 yt777 USA 90 wallstreet

    Read the article

  • ms-access: designing a report: printing text on specific x,y coordinates

    - by every_answer_gets_a_point
    i need to design a report that will print text on specified x,y coordinates for example, i will input (50,50), (60,60), (70,70) and i will have my program print text at those specific coordinates on the report. in total there will be about 50 different coordinates. how do i achieve this? should i be using a label control or a textbox? should i be creating the controls dynamically or should i already have controls set at the specified regions?

    Read the article

  • Docmd.TransferText question

    - by every_answer_gets_a_point
    b'h i will be programmatically importing a text file into a table. i have saved the import steps. i will use this: DoCmd.TransferText(TransferType, SpecificationName, TableName, FileName, HasFieldNames, HTMLTableName, CodePage) to do the import. this is what SpecificationName means: Specification Name The specification name for the set of options that determines how a text file is imported, exported, or linked. For a fixed-width text file, you must either specify a specification name or use a schema.ini file, which should be stored in the same directory as the imported, linked, or exported text file. i do need a specific specification; however i do not know how to specify one. when i manually imported a table, i did save the specifications for my import, however i do not know how to call this in the TransferText. does anyone know how to specify SpecificationName ?

    Read the article

  • Adding Items To A Combo Box Without Code?

    - by Soo
    I want some default values in my combo boxes but can't seem to figure out how to do this without writing a module that populates the combo boxes. How can I manually fill in the combo boxes so I don't have to use code to do something so simple. Thanks

    Read the article

  • Dynamically Populate Listbox - Exclude Empty cells

    - by Daniel
    I am creating a form in excel (not a userform) and I am populating the listbox using cells. However, these cells are sometimes A1:10 and sometimes they are A1:A4. Is there a way to dynamically change what is shown in the listbox? Right now, when I use A1:10 and there are only 4 cells populated, I get the list of 4 populated cells followed by 6 blank entries. I'd like to get rid of the 6 blanks when there are only 4.

    Read the article

  • Access database Need to prevent from approving overlapping OT.Second Try with modified request Not a programmer [on hold]

    - by user2512764
    Employees Signups on company Website for advance overtime line. Access table already has overtime signups which does not require user to add the time but it requires only to add location as approved. Since this table has field Employee name, Date, start time and End time and location, All the fields has the data except for location. In the data base I have created a form based on this table. Since the table already have most of the information User only has to add location in the form field in order to approve overtime. Once user approves an overtime line for example: User approves overtime for employee name 'John' which starts on 7/1/2013 at 0400-0800, location is successfully added. When user tries to add location for John again which might has the start time for 7/1/2013 at 0600=0900. Again we are not entering Start time, End time and date it is already in the table. we are only entering location as approval. Soon user enters the location for John in the form field, since there is a conflict with previously overtime line which has already been approved. program needs to check employee name, date and time in previously approved (Added location) overtime line and The location in current record needs to be deleted and go to next record. I hope I have explained it in understandable format. Thank You,

    Read the article

  • How to automatically trigger the App Object initialization in Powerpoint ?

    - by asksuperuser
    It is said here: http://msdn.microsoft.com/en-us/library/aa211599%28v=office.11%29.aspx Before the procedure will run, you must connect the declared object in the class module (App in this example) with the Application object. You can do this with the following code from any module. Dim X As New EventClassModule Sub InitializeApp() Set X.App = Application End Sub Run the InitializeApp procedure. Run HOW ? By hand ? I want it to automatically run when opening the powerpoint rather. Is there any way ?

    Read the article

  • Docmd.TransferText to update data

    - by every_answer_gets_a_point
    i am using Docmd.TransferText to import data from a text file into my access table. i would like it to do the following: if the record already exists, then update it if the record does not exist then add it how do i accomplish this? currently i have this line: DoCmd.TransferText acImportDelim, yesyes, "table3", "C:\requisition_data_dump.txt", True

    Read the article

  • Get the folder where the last mailitem was moved in Outlook?

    - by user2892971
    I have a vbscript macro that I'm using in Outlook. It moves a mailitem to some folder, say X. After I run the macro and I try to manually move a mailitem from Outlook with Control-v, it defaults to folder X. I would like Control-v to default to the folder that it would have used before I ran the macro. Is there some way in VBScript to find out what folder the last mailitem was move to, and to return that to be the default folder after I run my script? Or is there a way to move a mailitem in my script without the destination folder being remembered by Outlook Control-v after I run the script? Thanks for any hints.

    Read the article

  • how to use same password on different userform on specicy worksheet?

    - by user3736237
    How to use same pw on different userform on specicy worksheet? E.g worksheet 1 open userform1 & worksheet 2 open userform2, but both using same password? This is the password ElseIf Pw = "1234" Then ImageNo = "PicGoh" pwno = 2 Or pwno = 3 ' ElseIf Pw = "1111" Then ' ImageNo = "PicGoh" ' pwno = 3 ElseIf Pw = "" Then pwno = 0 Else pwno = 1 End If End Sub Sub Mac3() If pwno = 0 Then Exit Sub ElseIf pwno = 3 Then UserForm2.Show ElseIf pwno = 2 Then UserForm1.Show ElseIf pwno = 1 Then MyVar = MsgBox("Wrong Password! Please Key In Your Password Again") If MyVar = 1 Then MacPw Mac3 End If End If End Sub

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >