opening workbook on specific cell

dave bates

Board Regular
Joined
Jul 7, 2008
Messages
106
Hi
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
Could somebody please help me with the following with excel 2003
<o:p></o:p>
I want to be able to set a workbook to open on a specific cell on a specific worksheet say A4 sheet 1.

thanks
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
thanks for the responses.

I'm obvioulsy doing something wrong because I can't get either codes to work!

I have tried both codes by typing into This Workbook, no error is given but the workbook still opens with the the cell selected that it was saved on

:confused:
 
Upvote 0
hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
yes macros are enabled<o:p></o:p>
<o:p></o:p>
I think the problem may have been that I had copied the code in to the individual worksheets listed under Microsoft Excel Objects rather then double clicking into the ThisWorkbook.<o:p></o:p>
<o:p></o:p>
I have tried again, the code works if I save and close on sheet 1 but if I save and close on another sheet that I get the following error<o:p></o:p>
<o:p> </o:p>
Run time error ‘1004’ selected method of Range class failed<o:p></o:p>
<o:p> </o:p>
Sorry to be a pain<o:p></o:p>

<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"> <v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype>
 
Upvote 0
try pasting this in your workbook this will open on sheet 3 --- change as required
Private Sub Workbook_Open()
With Application
.ScreenUpdating = False
Worksheets("sheet3").Activate
.ScreenUpdating = True
End With
End Sub
 
Last edited:
Upvote 0
Dave bates,

Or try this:

Private Sub Workbook_Open()
Sheets("Sheet1").Activate
Range("A4").Select
End Sub

Markmzz
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top