Looking to write a macro which includes a prompt to the user for use in Excel 2007. Specifics....Have a workbook including many worksheets with a common layout. Would like to write a macro to copy specific defined ranges from one worksheet to another but within the macro it would prompt the user to type in the worksheet name to copy the ranges from.
Example....User is at worksheet C in the file containing worksheets A, B, C, and D. User starts the macro and a prompt comes up for the user to input the worksheet name to source the ranges from (in this example A). User types in "A" in a dialog box and the macros copy/pastes the contents from range B4:B35 and Z2:z20 from worksheet A into those same ranges in worksheet C.
Working with a macro enabled workbook that has many sheets what would be a good code that would save Sheet1 into a new MACRO enabled workbook so that the 'Buttons' (which are linked to macros) on this specific sheet will be the only macros that will be copied to the new workbook as opposed to the rest of the macros that are found in different sheets?
I have created an Excel Workbook and this Workbook has a VBA code that enforces an expiry date of the workbook (TimeBomb from cpearson.com). So, if the expiry date has passed, the workbook will not open. But since it is VBA related, the expiry date will work only if one has enabled macros. If macros are disabled, the workbook will open regardless of the date.
So, is there a way for Excel to check if macros are enabled? and is there a way for Excel not to open the workbook, if the macros are disabled?
I'm posting a workbook on our network that I want to enable users to go in and update. I have the workbook designed, with entry fields for the data they need to enter, and they then push "Submit" to submit the new data to a hidden tracking log within the workbook.
Many of the users will be complete Excel newbies, and although I haven't posted the workbook yet, I am trying to anticipate possible issues. The first that comes to mind is that the user opening the workbook may not have macros enabled in their version of Excel, and they will get a message, and can't perform the udpate. Is there a way to add a Workbook Open event that automatically enable macros in the workbook when they open it, even if it is for this workbook only?
I have created an addin that runs several macros. To enable the user to undo any changes, I keep a backup prior to them using any of the macros in the form of a worksheet named back00xx. I want a prompt to be displayed to the user to remove these backups at the closing or saving of the file. The problem is that as an addin, how do I get it to display this prompt as the open workbook is not part of the addin.
Could one have a looping routine that is checking every xx min/sec to check if the current workbook contains any sheets starting back00
I have created a spreadsheet some time ago and have been asked to improve on it but I'm rusty with VBA.
I have an automated ordering system that saves each sent order as the date e.g "05-04-2013.xls" but the management team want a graph with the data for the last 4 weeks compared. I have created a seperate workbook called "consumables report.xls" which has a column with the products listed followed by columns "Quantity" and "cost" which is repeated for the 4 weeks of the month.
I want to add a button to prompt the user to choose the saved order e.g "05-04-2013.xls" (all orders saved in same directory) to copy and paste the quantity and cost columns (c8,D69) into "consumables report.xls". I got this to work earlier but it would only paste the formulas and not the values. So I need
A prompt to open workbook Copy range (c8,d69) Close work sheet Paste special .value (c8,D69)
I dont care if it has to open the workbook to copy the data as this will only be used once a month so it dosnt matter how slow the code is.
This file pulls totals from external links. The way I have it set up is that every month our log is saved to a naming scheme involving the date, then a fresh log is created for the current month. So, for each month I have "log mm-yyyy".
Now, the chart file is a thirteen month rolling chart (meaning every month it must show the thirteen most recent month's totals). I have created a macro to automatically update the links, based on an input in cell A:1 (meaning you can enter a date in the past and view the thirteen months previous). The problem is that we have only been doing the log for 10 months. So, when the macro runs to update the links, and it gets to months 11 through 13, it pops up a window for the user to manually browse for the missing(non-existent) files. There are quite a few cells that contain links to various information on these logs. I get a prompt for each cell and have to click "cancel". Once I have clicked cancel through all of the broken links, then everything works great.
My question (after all that) is, is there a way to suppress the prompt for the user to search for the missing file? Like I said, this chart is for management, and they shouldn't have to click cancel a dozen times just o look at a chart. If the file doesn't exist, then just break the link.
Obviously once the next three months are over, this problem will disappear, but in the mean time I need a solution.
I'm building a spreadsheet that consolidates multiple worksheets into one. I've got that portion done, but what i need help with is a user prompt. I don't have an example at the moment, but it should be fairly straight forward.
Rather than consolidating all the data into one worksheet I want to consolidate only the rows that contain certain information. The column I need to query in each worksheet is "BL". The only thing is that column won't always contain the same data. Is there a way to do basically a prompt to where it searches for the data they want and if it isn't in there it just moves on to the next worksheet automatically?
I am making a macro that requires that user to enter a directory path into a input box and the macro will open the file. Right now it works fine bit i would like to change the code so that instead of using an input box it brings up a box that will allow them to browse files on their computer and then select one to open.
I have a cell (C16) that has a date format (such as 08/28/2014). I want the value of this cell to be "N/A" when cell C7 is "No". When C7 is "Yes", I want Excel to prompt the user to enter a date for C16 when they click on C16. The formula for cell C7 is =IF(C3="No","No","Yes"). That's where the value of C7="No" comes from. If I didn't need a date for the value of C16, the formula would be something like =IF(C7="No","N/A","______"). I have just recently started trying Excel macros due to a tool
I've recorded this code and am looking to include it in a button. I would like for when a user clicks the button assinged macro that the active sheet is cloned and saved as a CSV file. The user should be prompted before saving on where (file location) they'd like to save the file.
Sub CloneWorksheet() ' ' CloneWorksheet Macro ' ' Sheets("SDW&Customer Workshop scheduled").Select Sheets("SDW&Customer Workshop scheduled").Copy ActiveWorkbook.SaveAs Filename:= _ "C:Documents and Settings1167916My DocumentsTestBook1.csv", FileFormat:= _ xlCSV, CreateBackup:=False End Sub
When a user Opens this particular Workbook I want them to put their name into an Input Box so that it appears on the Footer of each sheet. I have several Sheets in this particular Workbook. If they do not put there name in I want the workbook to close. I am having problems with the code I am using. Please see below:
Private Sub Workbook_Open() Dim strName As String strName = InputBox(Prompt:="Your Name Please.", _ Title:="Please Enter Your Name", Default:="Enter Name Here")
If strName = "Enter Name Here" Or _ strName = vbNullString Then Exit Sub Else: strName = vbNotNullString Worksheets("Front Page").RightFooter = strName End If End Sub
As you can see I still need a code after the first IF statement to close workbook. My main issue is after the else.
Basically, in the "Thisworkbook" code , i have some code in the Workbook_BeforeClose section. Currently , it autosaves the workbook in a folder i have specified.
However, i need to add some code.I want to check that a certain cell has a value in it before the user closes the workbook, and if the cell is empty, show a messagebox asking him to enter a value.
I know how to get a messagebox to pop up, the only thing is once the user clicks the OK button, i need the rest of the code execution to pause, allowing him to make the change then if he clicks the "X" (top right of the screen) to close the file or application, the filesave dialog appears and he can then save the document.
how to go about this because at the moment when user clicks ok, the messagebox just disappears and filesave dialog appears and he doesn't have a chance to edit the cell.
Is it possible to have a macro-enabled workbook to work on ios software(iphone or ipad app)? Currently I cant find any spreadsheet app that will let you have a macro enabled workbook. The code from the posts below would be great if they worked on my phone or ipad.
Scan barcode to excel with date & time stamp in & out.