Return User To Cell After Macro Has Run

Sep 10, 2006

I am writing some code where I will need to refresh data and do a few calculations while the user of the spreadsheet is working on the information. How do I write the code for VBA to record what sheet/ cell the user is currently on and then do i use the "GoTO" function to return the use to where he/she was when they left off.

View 5 Replies


ADVERTISEMENT

Macro To Return To Where User Was Working

May 29, 2008

i have an excel doc. with three sheets...
i may start that macro on any sheet any cell
the 1st thing that macro does is to go to sheet1 and after running the whole code it calls another macro... macro2

now macro2 runs in an infinte loop and runs evry 20 sec. the problem is every 20 sec the cursor comes back to sheet3.. i want the macro to return to the place where the user was working.. best wud be that the user can work seem lessly...

View 9 Replies View Related

Macro To Compare Values In User Specified Columns And Return To Different Workbook

Feb 21, 2014

I am trying to create a macro that will compare several un-formatted workbooks and copy just what I want to a workbook of my one.

I start by having 2 different workbooks opened ("Main" and "Change") side by side like this: 1.jpg

Then i run the macro in my "Main" workbook and it should appear an Userform like it showed in the image below: 2.jpg

This is so that i can manually fill the user form with the correct columns by looking at the excel file, for example:
Ref=E3;City=G3; Data=I3.

Pressing Ok, it fill the "Main" workbook with the matching information so it and closes the "Change" workbook.

At the moment my code is in this stage:

VB:
Private Sub CommandButton1_Click()
myfile = "C:Userssst1brgDesktopRelatorios" & TextBox1.Value
Application.Workbooks.Open Filename:=myfile
Windows.Arrange ArrangeStyle:=xlVertical

[Code] .....

But I am stuck because there isn't any error and nothing happens.

View 1 Replies View Related

Return User Changed Cell Address

May 4, 2008

The format for the sheet is set in stone and can't change, and therefore my macro's operate on set columns / rows amd cells.

Because the sheet is huge, im trying to figure out a way to only run the macro's that need to run and more specfically on the changed location.

The Question

I need to create a routine that on the user changing a cell, it returns the cell position (row,column), then it will call a routine i have already which decides based on the cell location, which macro to run and where.

View 9 Replies View Related

Pause Macro And Wait For User To Click On Cell To Resume Macro?

Jan 15, 2014

I have a macro where I manually select a cell then the macro kicks in to copy and paste the contents into the Find function. From there it goes to another work sheet, clicks on a cell in column one and searches for matching cell contents. Then If false it manually goes back to the original worksheet/cell and then I input a N in the left adjacent cell. If true I enter a Y. Right now I can only run this for the specific cell the macro was recorded for. I would like to expand this.

What I would like to do create a loop in the macro that waits for my cell choice input then continues with the with the Find function. If false the macro should just loop back to the original worksheet/cell and wait for input, ie the next cell selected. However, if true a worksheet/cell is selected, a Y is input and it loops back to the original cell and waits for input.

View 9 Replies View Related

Macro To Link Cell To Sheet & Cell Stated By User

Jun 3, 2008

I have a macro that inputs a sheet and cell from the user. when the macro tries to make a formula it outputs =data!'AE3'. I need it to output =data!AE3

Dim Sheet As String
Sheet = InputBox("Take Data from where?")
Dim startcell As String
startcell = InputBox("Start Cell?")

ActiveCell.FormulaR1C1 = "=" & Sheet & "!" & startcell & ""

View 3 Replies View Related

Pause Macro To Allow User To Select A Cell?

Aug 15, 2014

I am wanting to pause a macro to allow a user to select a cell and when the user hits enter the macro starts running again. My intention is that a user would select cell B5 or B8 or B55 and then hit enter and the cell would move 6 cells right and enter a value from the macro. The following is what I have tried and even though it allows to select a cell, it doesn't make that cell the active cell.

[Code].....

View 3 Replies View Related

Allow User To Edit Cell Contents Within Macro

Feb 4, 2014

I need to query a column and find the cells that have been incorrectly coded. For example the coding standard is #<reference number>/. Sometimes people forget the "/". It is not as easy as using search and replace because the string may have more contents than the above.

For example it may show: ATM/45678/#789876 dt. 1-2-14/ or it something like CHQ/44384/#78987600.

There are many permutations. So I need to find the cells that don't have a "/" following the #<reference number>, then allow a user to enter the slash. At this stage, I don't need code to find cells containing errors, I think I can figure that out. I do need to know how to allow the user to edit the cell as part of the macro. Once the user corrects the error, the macro should then continue. Is this possible?

View 2 Replies View Related

Automatically Run Macro When A User Clicks Onto A Cell

Nov 20, 2009

is there any way a macro can be automatically run when a user clicks unto a cell?

View 5 Replies View Related

Macro Works When The User Tabs Out The Cell

Aug 7, 2007

How do you add a macro to a cell that works wen the user tabs out the cell?

View 9 Replies View Related

Is It Possible For A User To Select A File And Cell To Paste In During A Macro

Sep 3, 2008

I was planning to do was have a macro where the document opened and the cell that information was pasted in was decided depending on which cell was selected when the macro was run.

This worked fine, but it does mean that it needs someone who can edit the VBscript every time there is a new starter or someone leaves so isn't really viable.

What I was wondering, is if it is possible for me to start a macro, which then drags in the information I need from a text file, does all the calculations and rearranging, and then brings up a prompt for the user to open the document they want to paste it in, click on the cell where the pasting will start, and then the macro continues from there?

To try to explain it in as clear a way as I can. Say we have three managers, Alan, Brenda and Charlie. In Alan's team there are 10 staff members. Aaron, Bill etc.etc. If we have just run the report for Aaron, the macro will run, automatically drag all the information in and rearrange it, then it will pause while the user opens up the "Alan" spreadsheet, they select the "Aaron" first cell, click OK or something, and then the macro continues on its happy way?

View 9 Replies View Related

Call Or Go Back To Macro After User Action Such As Clicking In A Cell

Sep 27, 2012

I am about to write a small macro to do a iteration calculation. I would like though for the user to select me a cell so that the macro uses the value in that cell to start calculations. Now, what I think would be the problem is how do I code a "time" or notice an action such as clicking in a cell to continue with the macro.

Would it be by inserting a pause in the code of a certain time so that gives the user time to click and wait for the code to start? If so, how would much time is enough? Is there another thing that could restart the code such as "noticing a click in a cell" command in VBA?

View 1 Replies View Related

Macro To Jump To A Specific Cell Based On User Input?

Apr 17, 2013

At the top of my spreadsheet, a day of the week is selected via Dropdown.

Below that in a table, the days of the week are split into hourly slots.

I want to write a macro to jump to the first cell in the bottom table containing the day selected in top cell.

View 9 Replies View Related

Macro To Find Variable User Defined Cell In Worksheet

Nov 7, 2013

I have a worksheet named "ABC". In row 4 of this worksheet, each cell from G to BG is numbered from 1 onwards and each cell has a unique number. I would like to have a macro ask the user through a pop-up question box which column data should be calculated in. For example, if the user types "1" in the question box, the macro will go to column G which has "1" in cell G4 and will select G5 the cell just below the column the user defined and calculate the formula.

View 6 Replies View Related

Return User Id Or Name

Jul 22, 2007

i have been looking everywhere to find a way to get user info.

in excel, is there a formula or macro so that when saved, the user info is put in the file without the user putting their own name or id?

View 9 Replies View Related

How To Return Value From VBA User Defined Funtion

Nov 26, 2009

how to return value from VBA User Defined Funtion

View 9 Replies View Related

Return To Active Cell After Macro Run

Jul 24, 2007

I am using Excel to tabulate scores for my employees. We work in a very busy and open office, so there is a need to be able to obfuscate the scores, but also help keep from losing my place while punching the scores.

I would like it to be able to return to the last cell that I was punching a score in...I used "ActiveCell.SpecialCells(xlLastCell).Select". I have also used " x= cells(Rows.count,2).end(xlUP).row" followed by "cells(x+1,2).select", but both with no luck...

Sub Hide_Scores()
Range("B15:EU35").Select
ActiveSheet. Unprotect
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0

View 6 Replies View Related

User Defined Function To Return Fiscal Year Of A Date

May 2, 2012

I am working with a fiscal year that starts in December and ends in November. I want to make a user defined function that will return the fiscal year of a date. I've created the below code, but it returns a zero.

Function FiscalYear(DateFY)

If Month(DateFY) = 12 Then
Year (DateFY) + 1
Else
Year (DateFY)
End If
End Function

View 3 Replies View Related

Return To Original Page, Cell After Macro

Nov 5, 2009

I have a workbook with 7 sheets. Each sheet has about 9 different macro buttons that are repeated all over the sheet in various locations. I want to return automatically to the sheet and cell that was last active before running a macro.

View 2 Replies View Related

Macro - Add Carriage Return To End Of Text In Cell

Oct 31, 2007

I am looking for some assistance in creating a macro that would allow me with one key stroke to enter a cell in edit mode, add a carriage return to the end of text in the cell, then move the cursor to the next cell.

View 9 Replies View Related

Return To Initial Cell After Running Macro

Oct 24, 2007

I've a workbook with 3 tabs with names "tab1, tab2, difference" and I've a macro that calculates tab1-tab2 and puts the results in tab "difference" This macro runs every time I open the workbook or every time dataset is refreshed on any tab.
everything works great but i've following issue.

let's say my cursor is in tab2 & i refresh/update dataset on tab2 which will trigger macro to update values in tab "difference".. this is good. but, soon after macro runs & updates tab "difference", cursor is no more in tab2 but in tab "difference" this is OK if I've 1 or 2 or few tabs but i've 25 tabs & the user has to go back to the initial tab everytime dataset is updated on any tab. Is there a way for the macro to recognize where the cursor initiallly was & run the macro & place the cursor back to the initial tab?

View 2 Replies View Related

Macro To Return Yes Or No Based On Multiple Cell Dates

Dec 16, 2008

I need a macro that based on multiple cell dates determines if the person is qualified or not, and puts yes or no in column A... all of the dates are yearly.

View 5 Replies View Related

Return To Original Cell After Freeze Panes Macro

Dec 3, 2007

I have a workbook where I have columns requiring entry from A to AD. I have set conditional formatting in column A to show a colour if there is an entry in column AD. I would like to use a macro to always freeze panes in column D (to show the data in the first 3 columns) and the macro would then show column AD in the other frozen pane/split.

As there will always be an entry in column A but not always in column AD I want to be able to select any highlighted row in column A , run the macro and the cursor will be showing in column AD on the same row ( relative reference?) thus showing the entry in AD next to the other info in columns A, B and C.

At the moment I have a macro that unfreezes my header row and is set to always choose the "next empty cell" but I don't know the code to change it to get what I want. Currently if I select any entry in column A e.g. row 100 and run the macro I find the cursor showing in AD2! Of course I would like to run another macro to return back to A on the same row too.....

View 9 Replies View Related

If Cell = "ERROR", Need Pop Up (user Form?) Message With A Macro.

Jun 24, 2009

If cell K6= "ERROR" I need a message to pop up on screen with the message "Wrong Entry click OKAY to find, Click CANCEL to ignore". Clicking OKAY would simply go to worksheet named "MONITOR". Clicking Cancel would just clear the pop up from on screen.

View 5 Replies View Related

Excel 2003 :: Macro To Open Folder Then User Selects File Then Macro Continues To Run

Nov 6, 2011

I use Excel 2003 at work. I'm looking for some code that will Open a folder and then lets the user to select a file then continues to run the macro.

The file name they select will look similar to this K2271011.504 or K3011111.201

View 3 Replies View Related

Macros Not Visible: End User To Be Able To Run The Report Multiple Times By Choosing The Name Of The Macro From The Macro Menu

Jul 16, 2007

I have written two VBA programs around the same time. Both run on open and pull external data and create graphs. My problem is that I want the end user to be able to run the report multiple times by choosing the name of the macro from the Excel macro menu (i.e. Tools>Macro>Macros) but only one of the workbook macros shows up on the menu. why the other macro is not visible on this menu???

View 2 Replies View Related

User Inputs Area Into Macro And Macro Continues To Run After Input

Oct 9, 2012

I have recorded the following marco and it works fine. I would like to modify it so the user would highlight a range of cells rather than have the fixed area :

"'ConsExecProp@20120920'!R4C5:R113C21"

What code lines would need to be added?

Application.Goto Reference:="R4C5"
ActiveWorkbook.PivotCaches.Create(SourceType:=xlConsolidation, SourceData:= _
Array("'ConsExecProp@20120920'!R4C5:R113C21"), Version:=xlPivotTableVersion12 _

[code]....

View 4 Replies View Related

Return The Column Number Of First Column In A User Inputted Range?

Feb 19, 2009

I'm creating a macro that creates a co-ocurrence matrix from variables that are adjacent to each other.

In order to proceed, I need to know how to return the column number of the first (leftmost) column in a range that the user selects.

View 2 Replies View Related

How To Return Address Of Column Or Cell Select Not Just Return Value

Aug 18, 2014

How to return address of the column or cell I selected from Application.Inputbox, not just return the value?

[Code] ....

View 8 Replies View Related

Formula: If Value Return Is = To Value Of Cell Above Then Find Return Next Value

Feb 17, 2010

Is there a way with the following formula to tell it that if value return is = to value of cell above then find return next value?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved