I'm trying to update a worksheet in a workbook without sucess
DDEPoke>Excel,C:\My Documents\310504.xls,'Saturday Till'!R3C3,1234
This is what I have tried. Does anyone know the correct syntax for DDEPoke where you need to specify a particular worksheet in the workbook
Many thanks,
Alistair
DDEPOKE for Excel
Moderators: Dorian (MJT support), JRL
I've currently no idea if its possible to call a worksheet directly. Maybe this workaround helps:
Press CTRL+PgUp/PgDown to cruise through the available worksheets
Press ALT+OHR to "rename" the sheet and CTRL+C to transfer the name of the worksheet to the clipboard (to identify which one is currently active)
Press ESC to leave the worksheets label
.
.
.
Press CTRL+PgUp/PgDown to cruise through the available worksheets
Press ALT+OHR to "rename" the sheet and CTRL+C to transfer the name of the worksheet to the clipboard (to identify which one is currently active)
Press ESC to leave the worksheets label
.
.
.
I know that this question is 2 years old but I do have an answer to help out.
You can create a macro inside of Excel to direct you to a specific sheet and then fire this "Excel" macro off with a keyboard short cut. The keystrokes can be sent with MS
Here is an example:
Sub test()
Sheets("Sheet1").Select
End Sub
You can even have it go to a perticular cell too!
Sub test()
Sheets("Sheet1").Select
Range("A1").Select
End Sub
Rory
You can create a macro inside of Excel to direct you to a specific sheet and then fire this "Excel" macro off with a keyboard short cut. The keystrokes can be sent with MS
Here is an example:
Sub test()
Sheets("Sheet1").Select
End Sub
You can even have it go to a perticular cell too!
Sub test()
Sheets("Sheet1").Select
Range("A1").Select
End Sub
Rory
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You can even do all that directly within Macro Scheduler with no need to add any macros to Excel or modify the Excel file at all:
VBSTART
Sub xlExample
Set oExcel = CreateObject("Excel.Application")
oExcel.Visible = true
oExcel.Workbooks.Open "c:\my documents\excelexample.xls"
oExcel.Sheets("Sheet2").Select
oExcel.Range("A1").Select
End Sub
VBEND
VBRun>xlExample
This example starts Excel, opens excelexample.xls, selects Sheet 2 and highlights Range A1.
VBSTART
Sub xlExample
Set oExcel = CreateObject("Excel.Application")
oExcel.Visible = true
oExcel.Workbooks.Open "c:\my documents\excelexample.xls"
oExcel.Sheets("Sheet2").Select
oExcel.Range("A1").Select
End Sub
VBEND
VBRun>xlExample
This example starts Excel, opens excelexample.xls, selects Sheet 2 and highlights Range A1.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
I am at the "wrong" PC right now, but there is a VERY simple solution to addressing specific sheets. I have this code from many many months ago. Actually DDERequest can read directly from Excel, no VBScript. Just add a setting in the command. I'll find it later and post it. It may already be here in the forum somewhere.