can we save with macro

  • Thread starter Thread starter sakijung
  • Start date Start date
S

sakijung

I'm a newbie in macro excel. If I want to save the file by using th
refference cll e.g. cell c3 = th001 aa1 = 101, I would like to save a
new file as "c:\my documents\101th101. Please help me
 
Hi
try something like

sub save_it()
dim wks as worksheet
dim fname
dim path
set wks = activeworkbooks.worksheets("Sheet1")
fname=wks.range("C3).value & wks.range("AA1").value
path="C:\my documents"
activeworkbook.saveas path&fname
end sub
 
Thank you very for your answer. I hope to see you again. Sawasdee Kru
from Thailand-Goodbye for German
 
Back
Top