I am trying to add a simple function to button in Excel.
First I need to select cell G24 as that where the inserted file should be placed on the worksheet. Then on the Add Object window to open but the tab 'Create from file selected.
Below is only part of the solution
Sub ShowInsertObj()
Application.Dialogs(xlDialogInsertObject).Show
End Sub
Also is it possible to detect that file has been placed on the page ? In cell G24?
I am wanting users to attach a required zip file. I then need to check if they have done so.
Is there a way to use the open dialog box (like as if you where opening another workbook) and then with the selected item inster the path and file name into a cell.
I want to record a macro that can be used to open different dialog boxes e.g conditional formatting, go to, sort, paste special etc.
what should be the way to record a macro to do this. I have tried it but to stop macro recorder I have to close the dialog box first but in this way it records nothing.
I attached a file with macro7 that prompts the user for text that will get rotated and inserted into the top left corner. The text is in the form "batch xxxx." I need a carriage return between the word "batch" and the numeric string. I guess the input box should have two lines instead of one.
the code does some other stuff which is why it takes a while to execute ....
I would like a macro to print 2 sheets in a workbook. I can write the macro that will select the sheets I want, but I don't want it to just go and print because depending on if the user wants it printed in color, b&w, etc.
they have to choose a different color. What code do I use to open the print dialog box?
I am looking for code that when cmdfile is click, it will open up the 'open file' dialog box, and go to a specified directory on the pc, and list ALL files in that folder, but not open it. I want the user to select the file manually.
I found the following code on the forums, but don't know if it is relavent in my case
Const myDir As String = "C:NAVIGATIONPERSONAL ussNLN"
I am interested to know how to produce a dialog box that pops up upon a button press that does a simple calculation principal plus interest calculation.. ie.
the msg box or userform when called would have the following:
Label1 (Principal Amount) ===> Textbox1 Label2 (Interest rate per year) ====> Textbox2 (formatted to two decimal places). Label3 (Results shown) ====>Textbox3
than an "ok" button on form or "submit" button when submitted, it is entered into a defined cell..
Just as an aside or complication, is it possible to have say after Label3 , 2 dropdown box where one reads colum values and one reads row values on the worksheet, that one people can pinpoint where to enter the final value from Label3
I have a procedure that opens a txt file and I was wondering if the open dialog box could have a title indicative of action taking place. It would say in the title for example: "Please choose the database txt extract to load".
I'm looking to have a Button on my sheet that will open the Find box so people do not have to go to the menu to find it. Is there a code that can open this?
Is it possible to set the starting path for the open dialog - using expression. GetOpenFilename so that the contents of the correct folder are visible immediately?
I have inserted a workwook in another workbook that the user will have to edit and save changes from time to. I have the excel file inserted as an object. when I double click it the file opens and I can save changes made.
I'm trying to create a macro that can open the object from other tabs. i used the macro recorder and got this
Range("I21:O25").Select Sheets("Formulas").Select ActiveSheet.Shapes("Object 3").Select Windows("Worksheet in SBATrendReport2010").Visible = True Selection.Verb Verb:=xlPrimary ActiveWindow.WindowState = xlMaximized End Sub
The problem I'm having is I get a error message when I run the macro "subscript out of range.
Is it possible to use VBA to call an existing Excel function? I want to have code that calls up the "Insert - Object" popup window in the same manner as it would if the user clicked the toolbar.
I want to use VBA to insert an Organisation Chart in Excel 2007 (ie if I did this manually it would be Insert, SmartArt, Hierarchy), but I cannot find anything on line that shows how to do this in Excel 2007. I know the code for Excel 2003, but that does not work in 2007.
The error I am getting (highlighted in red) is that it cannot view the object properties. So the picture is put in, but it's emplacement cannot be set and the picture cannot be renamed (which must occur for other macros to see it). Pages are not protected. The only self automated macro is on workbook open, and it only resizes to view the area depending on the persons resolution. Microsoft Excel 2003
Dim objX As OLEObject Set objX = ActiveSheet.OLEObjects.Add(ClassType:="Word.Document.8", Link:=False, DisplayAsIcon:=False) objX.Border.Color = RGB(255, 255, 255) objX.Height = 200 objX.Width = 600 objX.Top = 300 objX.Left = 100 '-------make active objX.Activate Set objX = Nothing
i would like to place the object in a worksheet and have all the rows of data move down below the word object (i.e., below the word object--i do this resizing manually now...)...?
I would like to add some icons on the left side of excel open file pane to faciliate my work. Because i need to load some files under the same folder many times a day. Does anybody know how to do that? I've seen people has more icons on the pane before. The defaut setting has only 'History', 'My Documents', 'Favorites', 'Desktop' and ' My nutwork places' on it.
I need some help with this error. I have some VBA code in Outlook that runs whenever a task reminder goes off. The code is supposed to open a workbook, send email based on the info in the workbook, then close the workbook and quit excel.
The task reminders are set to go off every two hours. Sometimes this will work fine for days and then randomly (as far as I can tell) I get the error: "Method Open of Object Workbooks failed". If I press Debug and then Run without changing anything at all, it works fine.
I am using Outlook 2007 and Excel 2007. The workbook is a shared workbook on a network drive.
I can post code if needed, but will have to go to that computer.
Why do I occasionally get this error when the workbook definitely exists and has the same name and path?
What does entering debug mode do that then allows the macro to run without error?
I have Excel and Outlook 2010 64-bit. I'm trying to develop HTML e-mails that are a mix of text drawn from cells on one sheet and picture objects on another. I have no problem with the HTML body text, but I cannot figure out how to reference and place the Shape objects. I am using:
Code: ... .HTMLBody = "" & Range("F1").Offset(i) & Range("G1").Offset(i) & "" ... and I want to embed, between the text brought in with cells F and G, a picture object like
Code: Sheets("Images").Shapes("Picture 1")
I've found code that brings in a picture from a file but, for portability's sake, I really want to have the pictures maintained on the Images sheet and not in a separate file. However, I cannot figure out how to connect the HTML code with the spreadsheet object.
A most of time I'm using VLOOKUP function. I want to call specially this function by pressing custom button (w/o pressing "Insert Function" and choosing VLOOKUP)
I have some code in a standard module. When I try to run it, it does not appear in the dialog box. The code's below.
Code: Sub CopyCat(ByVal Target As Excel.Range) If Target.Column 21 Then Exit Sub If Target.Value = "Y" Then Cells(Target.Row, "A").Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1) Cells(Target.Row, "B").Copy Destination:=Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp).Offset(1) Cells(Target.Row, "C").Copy Destination:=Sheets("Sheet2").Range("C" & Rows.Count).End(xlUp).Offset(1) Cells(Target.Row, "D").Copy Destination:=Sheets("Sheet2").Range("D" & Rows.Count).End(xlUp).Offset(1) Cells(Target.Row, "E").Copy Destination:=Sheets("Sheet2").Range("E" & Rows.Count).End(xlUp).Offset(1) End If End Sub
I am very sure that I have deleted all my macro in my excel spreadsheet and saved. However, when I tried to open the file, the macro dialog prompt me again..... I have press alt F11 and confirmed that there is no macro.
Code: Private Sub Workbook_Open() Form1.Show End Sub
It has worked perfectly for about 2 weeks, well now when I go to open the workbook it gives me the debug error of Run Time error 424 Object Required. I last ran this today at about 8 a.m. no errors, but now about 4 hours later, it is bugging out. What is causing this?