I've hit a spot in my coding that I just can't figure out!
The goal of my code: Insert records into an excel spreadsheet. You know, name, date, product number, quantity, cost. I want them to go across the row from A-F... however, not necessarily in row 1. I'm trying to allow myself to input the row I want the data to go to (using a dialogue box), and then it all goes there. But in my code, that doesn't work. Also, what I want is that when I input new data, the current data shifts down a row (so nothing becomes overwritten).
Please read my code, be warned it's messy, and try to help me as best you can!!! Greatly appreciated.
any ideas??? =) please and thank you!
The goal of my code: Insert records into an excel spreadsheet. You know, name, date, product number, quantity, cost. I want them to go across the row from A-F... however, not necessarily in row 1. I'm trying to allow myself to input the row I want the data to go to (using a dialogue box), and then it all goes there. But in my code, that doesn't work. Also, what I want is that when I input new data, the current data shifts down a row (so nothing becomes overwritten).
Please read my code, be warned it's messy, and try to help me as best you can!!! Greatly appreciated.
Code:
tell application "Microsoft Excel"
activate
display dialog "Input Row" default answer "" buttons {"OK"} default button 1
set blank to result
set r to text returned of blank
display dialog "Pickup Date" default answer "" buttons {"Cancel", "NEXT"} default button 2 with icon caution
set dialog1 to result
set pickup to text returned of dialog1
if button returned of dialog1 is "NEXT" then display dialog "Product #" default answer "" buttons {"Cancel", "NEXT"} default button 2 with icon caution
set dialog2 to result
set product to text returned of dialog2
if button returned of dialog2 is "NEXT" then display dialog "Customer" default answer "" buttons {"Cancel", "NEXT"} default button 2 with icon caution
set dialog3 to result
set customer to text returned of dialog3
if button returned of dialog3 is "NEXT" then display dialog "Quantity" default answer "" buttons {"Cancel", "NEXT"} default button 2 with icon caution
set dialog4 to result
set qty to text returned of dialog4
if button returned of dialog4 is "NEXT" then display dialog "Sizes" default answer "" buttons {"Cancel", "NEXT"} default button 2 with icon caution
set dialog5 to result
set sizes to text returned of dialog5
if button returned of dialog5 is "NEXT" then display dialog "Amount Due" default answer "" buttons {"Finished"} default button 1 with icon caution
set dialog6 to result
set due to text returned of dialog6
set value of cell "A14" to pickup
set value of cell "B14" to product
end tell
any ideas??? =) please and thank you!