-
OK. 1. Set a public variable to store the current worksheet name public shname as string.
2. Use the workbook open+workbook sheetdeactivate event to write shname, and write the worksheet name to snname
3. Back button, only needed.
worksheets(snname).select on the line. ** and structural design.
See the attachment for details!
-
You don't have to do anything, Excel has this feature by itself.
In the file that command. The bottom 1... This is the latest file you opened,2... It's the last file you opened, 3... 4.。。And so on.
-
sub returns to the original worksheet ().
with sheets( 'Use.
Replaces the current worksheet.
'''''''''If the worksheet named "temp" does not exist, create an ON Error Resume Next'Ignore the trap error below with sheets("temp")
if <>0 then 'The specified worksheet does not exist ="temp"
The new table you add is automatically activated as the current table.
end if
end with
select ''''''Activation returns ""Legacy worksheet for msgbox"The original worksheet has been returned"
end with
end sub
Try.
-
You need to load a toolbar and add the most recent one to it.
-
with sheets( 'Use. Replaces the current worksheet.
''''''''''''''''''''''If the temp table does not exist, create a new one''''''''''''''''''''''
on error resume next 'Ignore the trap errors below.
with sheets("temp")
if <>0 then 'The specified worksheet does not exist =
temp" 'The new table you add is automatically activated as the current table.
end if
end with
select ''''''Activation returns ""The original worksheet is operating.
Do what you have to do.
end with a try.
-
Take a look at your original worksheet, adding a new worksheet will not change the current active worksheet.
-
Before adding a new sheet, record the current table, like **sub run().
dim obj as worksheet
set obj = activesheet'Record the original sheet'Add a new sheet
1) = "Operation"'Perform operations on the original sheet set obj = nothing
end sub
-
In the deactivate event of the worksheet, the program can remember the name of the current sheet (it can be recorded in a cell).
-
Just use a hyperlink.
-
The simple way to do this is to draw a button, paste it into each worksheet, and add a hyperlink to the Excel home page you said.
-
sub returnit()
sheets("Home page interface").activeend sub
Then you add a control.
sub comb_click()
call retrunit
end sub
-
public sub addbutton()dim i as integer
dim n as integer
dim sheetname as stringn =
for i = 1 to n
sheetname =
if sheetname <>"Home page interface" thencall worksheets(sheetname ).="", link:=false , displayasicon:
false, left:=, top:=, width:, height _
end if
nextend sub
Then add the following statement to each page.
private sub commandbutton1_click()worksheets("Home page interface").activateend sub
-
I add a button to the no page, button **:
private sub commandbutton1_click()worksheets("Home page interface").activateend sub
-
1. As below screenshot shown, I want to place each workbook name from the first chapter on my desktop into a worksheet.
2. Create a new workbook, name it "Chapter 1 Table of Contents", and press Alt+F11 to open the macro interface.
3. In VBA, click the insert button, click the module under the insert menu, you can create a new module, the system defaults to module 1, of course, you can also rename it as needed.
4. Use the do loop statement and enter ** as shown in the following figure in VBA
5. Go back to the workbook named "Chapter 1 Table of Contents" and press Alt+F8 to pop up the macro dialog box.
6. Click the execute button in the macro dialog box, the macro dialog box will be automatically closed, and the name of each folder in the first chapter will be displayed in sheet sheet1. Finally, adjust the format according to your needs.
Don't be like that, you have to know that the marriage of two people is not easy. It's impossible to fall in love with someone for 2 days, and even if it is, it's not deep, stay away from him, don't see each other again. He said that he would not give up his wife, you will not have results at all, so why should you pursue things that have no results? >>>More
Because you have loved, you will not become an enemy; Because I have been hurt, I won't be friends; It can only be the most familiar strangers. Love has been known, drunk has been drunk. The memories of love should be well collected, but the happiness in the future should be found separately. >>>More
If there is no repetition after the plan + unit + keyword is connected, then you can use the array function, enter in j2 and then hold down the ctrl+shift key, and then press enter, the result is as follows:
I have him in my heart, for example, I will miss him when I can't see him, I will feel happy and happy when I am with him, and I will worry about him when I know that he is in trouble. >>>More
People who are attracted at first sight really can't just go with the flow. So I will deliberately create a chance encounter, and I will think that he likes me affectionately, and it was okay at first, but if I don't get a reply after a long time, I will start to be very sensitive, and I can cry when I see my back, which is very painful. Before I met him, how could I imagine that I would like someone so much, and I like to feel the piercing pain of my heart, and live in the one-man show I made up for myself. >>>More