ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to I make sure that my workbook always opens with a desired sh (https://www.excelbanter.com/excel-discussion-misc-queries/123229-how-i-make-sure-my-workbook-always-opens-desired-sh.html)

Shariq

How to I make sure that my workbook always opens with a desired sh
 
Hi!
I've got a problem. I want to make sure that everytime I open a workbook, to
make it open always with the same page/sheet I want, because normally it will
open the sheet you were working on last.(before you closed it).
so please if someone can help me.




Carlo

How to I make sure that my workbook always opens with a desired sh
 
Hi Shariq

you could put following code in the ThisWorkbook part:

Private Sub Workbook_Open()
ActiveWorkbook.Sheets("xxxxx").Activate
End Sub

where "xxxxx" is the name of the sheet you want to open.

hth Carlo

"Shariq" wrote:

Hi!
I've got a problem. I want to make sure that everytime I open a workbook, to
make it open always with the same page/sheet I want, because normally it will
open the sheet you were working on last.(before you closed it).
so please if someone can help me.




Shariq

How to I make sure that my workbook always opens with a desire
 
Hi Carlo!
First of all thanx for your reply, I've done what you said, perhaps
something missing yet or I'm doing something wrong, but the problem still
persist, it still goes to the sheet, I was working last, can you maybe give
me some more tips.
Shariq,


"Carlo" wrote:

Hi Shariq

you could put following code in the ThisWorkbook part:

Private Sub Workbook_Open()
ActiveWorkbook.Sheets("xxxxx").Activate
End Sub

where "xxxxx" is the name of the sheet you want to open.

hth Carlo

"Shariq" wrote:

Hi!
I've got a problem. I want to make sure that everytime I open a workbook, to
make it open always with the same page/sheet I want, because normally it will
open the sheet you were working on last.(before you closed it).
so please if someone can help me.




Carlo

How to I make sure that my workbook always opens with a desire
 
Hi Shariq

tell me what you did exactly, so that i can follow your steps.
- Where did you put the code
- What name did you enter
and so on.

Carlo

"Shariq" wrote:

Hi Carlo!
First of all thanx for your reply, I've done what you said, perhaps
something missing yet or I'm doing something wrong, but the problem still
persist, it still goes to the sheet, I was working last, can you maybe give
me some more tips.
Shariq,


"Carlo" wrote:

Hi Shariq

you could put following code in the ThisWorkbook part:

Private Sub Workbook_Open()
ActiveWorkbook.Sheets("xxxxx").Activate
End Sub

where "xxxxx" is the name of the sheet you want to open.

hth Carlo

"Shariq" wrote:

Hi!
I've got a problem. I want to make sure that everytime I open a workbook, to
make it open always with the same page/sheet I want, because normally it will
open the sheet you were working on last.(before you closed it).
so please if someone can help me.




Shariq

How to I make sure that my workbook always opens with a desire
 
After opening the workbook, I clicked on the bottom, clicked on view code and
followed the rest in fact I copied and paste that what you had sent me, only
the sheet name I had changedin (brakets), then closed the workbook, reopened
it but it still didn't work.
So tell me if I've done something wrong, or I have to do some more in
addition to that.
thanx again,
Shariq

"Carlo" wrote:

Hi Shariq

tell me what you did exactly, so that i can follow your steps.
- Where did you put the code
- What name did you enter
and so on.

Carlo

"Shariq" wrote:

Hi Carlo!
First of all thanx for your reply, I've done what you said, perhaps
something missing yet or I'm doing something wrong, but the problem still
persist, it still goes to the sheet, I was working last, can you maybe give
me some more tips.
Shariq,


"Carlo" wrote:

Hi Shariq

you could put following code in the ThisWorkbook part:

Private Sub Workbook_Open()
ActiveWorkbook.Sheets("xxxxx").Activate
End Sub

where "xxxxx" is the name of the sheet you want to open.

hth Carlo

"Shariq" wrote:

Hi!
I've got a problem. I want to make sure that everytime I open a workbook, to
make it open always with the same page/sheet I want, because normally it will
open the sheet you were working on last.(before you closed it).
so please if someone can help me.




Carlo

How to I make sure that my workbook always opens with a desire
 
Hi Shariq

after you click "view code" Excel shows you the VBA-editor. But there you are
changeing the Code of the Sheet and not the one of the Book. So, in the
Project-
Explorer (Ctrl + R) you can go to the "thisWorkbook" and paste the code in
there.
You have to be careful, that you enter the name with "".

hope it works now

Cheers
Carlo

"Shariq" wrote:

After opening the workbook, I clicked on the bottom, clicked on view code and
followed the rest in fact I copied and paste that what you had sent me, only
the sheet name I had changedin (brakets), then closed the workbook, reopened
it but it still didn't work.
So tell me if I've done something wrong, or I have to do some more in
addition to that.
thanx again,
Shariq

"Carlo" wrote:

Hi Shariq

tell me what you did exactly, so that i can follow your steps.
- Where did you put the code
- What name did you enter
and so on.

Carlo

"Shariq" wrote:

Hi Carlo!
First of all thanx for your reply, I've done what you said, perhaps
something missing yet or I'm doing something wrong, but the problem still
persist, it still goes to the sheet, I was working last, can you maybe give
me some more tips.
Shariq,


"Carlo" wrote:

Hi Shariq

you could put following code in the ThisWorkbook part:

Private Sub Workbook_Open()
ActiveWorkbook.Sheets("xxxxx").Activate
End Sub

where "xxxxx" is the name of the sheet you want to open.

hth Carlo

"Shariq" wrote:

Hi!
I've got a problem. I want to make sure that everytime I open a workbook, to
make it open always with the same page/sheet I want, because normally it will
open the sheet you were working on last.(before you closed it).
so please if someone can help me.




Shariq

How to I make sure that my workbook always opens with a desire
 
Thanx carlo!
you've been a great help to me, on this matter, but I've got another
question for you if you can help me with that too, I'd appriciate it very
much.
OK Its about calculating time, I've formatted cells into time, and then
another cell, which produces the result, however my worry is if time spent is
less then an hour, it should produce result as minimum of an hour, but if
time exceeds an hour it should just calculate what ever time is spent.
formula =D7-B7+(D7<B7), This is what I've typed and have already tried
different stuff, but that all have too many errors in it.
I hope I got my query right, and you understand what I want, any suggestion
would be appreciated,
Thanx,
Shariq


"Carlo" wrote:

Hi Shariq

after you click "view code" Excel shows you the VBA-editor. But there you are
changeing the Code of the Sheet and not the one of the Book. So, in the
Project-
Explorer (Ctrl + R) you can go to the "thisWorkbook" and paste the code in
there.
You have to be careful, that you enter the name with "".

hope it works now

Cheers
Carlo

"Shariq" wrote:

After opening the workbook, I clicked on the bottom, clicked on view code and
followed the rest in fact I copied and paste that what you had sent me, only
the sheet name I had changedin (brakets), then closed the workbook, reopened
it but it still didn't work.
So tell me if I've done something wrong, or I have to do some more in
addition to that.
thanx again,
Shariq

"Carlo" wrote:

Hi Shariq

tell me what you did exactly, so that i can follow your steps.
- Where did you put the code
- What name did you enter
and so on.

Carlo

"Shariq" wrote:

Hi Carlo!
First of all thanx for your reply, I've done what you said, perhaps
something missing yet or I'm doing something wrong, but the problem still
persist, it still goes to the sheet, I was working last, can you maybe give
me some more tips.
Shariq,


"Carlo" wrote:

Hi Shariq

you could put following code in the ThisWorkbook part:

Private Sub Workbook_Open()
ActiveWorkbook.Sheets("xxxxx").Activate
End Sub

where "xxxxx" is the name of the sheet you want to open.

hth Carlo

"Shariq" wrote:

Hi!
I've got a problem. I want to make sure that everytime I open a workbook, to
make it open always with the same page/sheet I want, because normally it will
open the sheet you were working on last.(before you closed it).
so please if someone can help me.




Carlo

How to I make sure that my workbook always opens with a desire
 
Hi Shariq

No Problem.

Concerning your other problem: I'm not sure if i know what you mean.
You have a time, in let's say column A and in column B you want to have
your result. If Column A is less than an hour, B should be an hour.
If A is more than an hour, B should display the value in A!

Did I understand you right?

Cheers Carlo



"Shariq" wrote:

Thanx carlo!
you've been a great help to me, on this matter, but I've got another
question for you if you can help me with that too, I'd appriciate it very
much.
OK Its about calculating time, I've formatted cells into time, and then
another cell, which produces the result, however my worry is if time spent is
less then an hour, it should produce result as minimum of an hour, but if
time exceeds an hour it should just calculate what ever time is spent.
formula =D7-B7+(D7<B7), This is what I've typed and have already tried
different stuff, but that all have too many errors in it.
I hope I got my query right, and you understand what I want, any suggestion
would be appreciated,
Thanx,
Shariq



All times are GMT +1. The time now is 11:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com